[IPoIB] Fix NDIS WHQL 1c_InitTime test warnings related to too many
authorftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 28 Feb 2006 18:52:49 +0000 (18:52 +0000)
committerftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 28 Feb 2006 18:52:49 +0000 (18:52 +0000)
reset, connect, and disconnect events.

git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@223 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

ulp/ipoib/kernel/ipoib_adapter.c

index 47a4ad3..7e90b6d 100644 (file)
@@ -627,7 +627,10 @@ __ipoib_pnp_cb(
        case IB_PNP_SM_CHANGE:\r
        case IB_PNP_GID_CHANGE:\r
        case IB_PNP_LID_CHANGE:\r
-               p_adapter->hung = TRUE;\r
+               cl_obj_lock( &p_adapter->obj );\r
+               if( p_adapter->state == IB_PNP_PORT_ACTIVE )\r
+                       p_adapter->hung = TRUE;\r
+               cl_obj_unlock( &p_adapter->obj );\r
                status = IB_SUCCESS;\r
                break;\r
        }\r
@@ -920,7 +923,7 @@ ipoib_set_active(
                NdisWriteErrorLogEntry( p_adapter->h_adapter,\r
                        EVENT_IPOIB_PORT_UP + (p_adapter->rate/ONE_X_IN_100BPS),\r
                        1, p_adapter->rate );\r
-       \r
+\r
                NdisMIndicateStatus( p_adapter->h_adapter, NDIS_STATUS_MEDIA_CONNECT,\r
                        NULL, 0 );\r
                NdisMIndicateStatusComplete( p_adapter->h_adapter );\r