[IPOIB ]Fix a bugcheck when NdisMResetComplete called without previous reset request...
authortzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 19 May 2008 06:46:18 +0000 (06:46 +0000)
committertzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 19 May 2008 06:46:18 +0000 (06:46 +0000)
Signed by: Slava Strebkov

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

ulp/ipoib/kernel/ipoib_adapter.c

index b5fa667..e594a35 100644 (file)
@@ -807,7 +807,12 @@ ipoib_reset_adapter(
                if( status == IB_SUCCESS )\r
                        p_adapter->hung = FALSE;\r
        }\r
-\r
+       if (status == IB_NOT_DONE) {\r
+               p_adapter->reset = TRUE;\r
+       }\r
+       else {\r
+               p_adapter->reset = FALSE;\r
+       }\r
        IPOIB_EXIT( IPOIB_DBG_INIT );\r
        return status;\r
 }\r
@@ -863,7 +868,7 @@ __ipoib_adapter_reset(
 \r
        if( p_port )\r
                ipoib_port_destroy( p_port );\r
-\r
+       ASSERT(p_adapter->reset == TRUE);\r
        if( state != IB_PNP_PORT_REMOVE )\r
        {\r
                status = __ipoib_pnp_reg( p_adapter, IB_PNP_FLAG_REG_COMPLETE );\r