[ipoib] Return the link speed even if the link is down. (mlnx: 3304)
authortzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 15 Oct 2008 15:11:48 +0000 (15:11 +0000)
committertzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 15 Oct 2008 15:11:48 +0000 (15:11 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@1650 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

ulp/ipoib/kernel/ipoib_adapter.c
ulp/ipoib/kernel/ipoib_adapter.h
ulp/ipoib/kernel/ipoib_driver.c

index 5301419..d84574f 100644 (file)
@@ -306,7 +306,7 @@ adapter_construct(
        cl_perf_construct( &p_adapter->perf );\r
 \r
        p_adapter->state = IB_PNP_PORT_ADD;\r
-       p_adapter->rate = FOUR_X_IN_100BPS;\r
+       p_adapter->port_rate = FOUR_X_IN_100BPS;\r
 }\r
 \r
 \r
@@ -1065,7 +1065,7 @@ ipoib_set_rate(
                rate = 0;\r
        }\r
 \r
-       p_adapter->rate = rate;\r
+       p_adapter->port_rate = rate;\r
        IPOIB_EXIT( IPOIB_DBG_INIT );\r
 }\r
 \r
@@ -1124,8 +1124,8 @@ ipoib_set_active(
                 */\r
                IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_INIT, ("Link UP!\n") );\r
                NdisWriteErrorLogEntry( p_adapter->h_adapter,\r
-                       EVENT_IPOIB_PORT_UP + (p_adapter->rate/ONE_X_IN_100BPS),\r
-                       1, p_adapter->rate );\r
+                       EVENT_IPOIB_PORT_UP + (p_adapter->port_rate/ONE_X_IN_100BPS),\r
+                       1, p_adapter->port_rate );\r
 \r
                if( !p_adapter->reset )\r
                {\r
index 84425e9..a20e3fb 100644 (file)
@@ -168,7 +168,7 @@ typedef struct _ipoib_adapter
 \r
        struct _ipoib_port              *p_port;\r
 \r
-       uint32_t                                rate;\r
+       uint32_t                                port_rate;\r
 \r
        ipoib_params_t                  params;\r
        cl_spinlock_t                   recv_stat_lock;\r
index 40d5c37..2e5cd88 100644 (file)
@@ -955,31 +955,7 @@ ipoib_query_info(
                IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID,\r
                        ("Port %d received query for OID_GEN_LINK_SPEED\n", port_num) );\r
                cl_obj_lock( &p_adapter->obj );\r
-               switch( p_adapter->state )\r
-               {\r
-               case IB_PNP_PORT_ADD:\r
-                       /* Mark the adapter as pending an OID */\r
-                       p_adapter->pending_query = TRUE;\r
-\r
-                       /* Save the request parameters. */\r
-                       p_adapter->query_oid = oid_info;\r
-\r
-                       IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID,\r
-                               ("Port %d returning NDIS_STATUS_PENDING\n", port_num) );\r
-                       status = NDIS_STATUS_PENDING;\r
-                       break;\r
-\r
-               case IB_PNP_PORT_REMOVE:\r
-                       IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID,\r
-                               ("Port %d returning NDIS_STATUS_NOT_ACCEPTED\n", port_num) );\r
-                       status = NDIS_STATUS_NOT_ACCEPTED;\r
-                       break;\r
-\r
-               default:\r
-                       CL_ASSERT( p_adapter->p_port );\r
-                       info = p_adapter->rate;\r
-                       break;\r
-               }\r
+               info = p_adapter->port_rate;\r
                cl_obj_unlock( &p_adapter->obj );\r
                break;\r
 \r
@@ -2016,11 +1992,6 @@ ipoib_resume_oids(
        {\r
                switch( query_oid.oid )\r
                {\r
-               case OID_GEN_LINK_SPEED:\r
-                       ipoib_complete_query( p_adapter, &query_oid,\r
-                               status, &p_adapter->rate, sizeof(p_adapter->rate) );\r
-                       break;\r
-\r
                case OID_GEN_MEDIA_CONNECT_STATUS:\r
                        info = NdisMediaStateConnected;\r
                        ipoib_complete_query( p_adapter, &query_oid,\r
@@ -2028,8 +1999,7 @@ ipoib_resume_oids(
                        break;\r
 \r
                default:\r
-                       CL_ASSERT( query_oid.oid == OID_GEN_LINK_SPEED ||\r
-                               query_oid.oid == OID_GEN_MEDIA_CONNECT_STATUS );\r
+                       CL_ASSERT( query_oid.oid == OID_GEN_MEDIA_CONNECT_STATUS );\r
                        break;\r
                }\r
        }\r