[ofw] [Patch][IPoIB_NDIS6_CM] Recv shutter fix when init process fails

Alex Naslednikov xalex at mellanox.co.il
Thu Nov 11 05:17:32 PST 2010


You are right.
Please, find attached the correct patch
Index: ulp/ipoib_NDIS6_CM/kernel/ipoib_adapter.cpp
===================================================================
--- ulp/ipoib_NDIS6_CM/kernel/ipoib_adapter.cpp         (revision 2986)
+++ ulp/ipoib_NDIS6_CM/kernel/ipoib_adapter.cpp      (working copy)
@@ -429,7 +429,8 @@
                                                p_adapter->p_ifc->get_err_str( status )) );
                                return status;
                }
-
+
+             p_adapter->ipoib_state = IPOIB_UNINIT;
                IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_INIT,
                                ("Shutter Init, state = %d\n", p_adapter->ipoib_state) );
                IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_RECV,
Index: ulp/ipoib_NDIS6_CM/kernel/ipoib_adapter.h
===================================================================
--- ulp/ipoib_NDIS6_CM/kernel/ipoib_adapter.h             (revision 2986)
+++ ulp/ipoib_NDIS6_CM/kernel/ipoib_adapter.h          (working copy)
@@ -71,6 +71,7 @@
 } csum_flag_t;

 typedef               uint32_t ipoib_state_t;
+#define                             IPOIB_UNINIT                   0
 #define                               IPOIB_INIT                                          1
 #define               IPOIB_PAUSED                                 2
 #define                               IPOIB_PAUSING                               4
Index: ulp/ipoib_NDIS6_CM/kernel/ipoib_driver.cpp
===================================================================
--- ulp/ipoib_NDIS6_CM/kernel/ipoib_driver.cpp             (revision 2986)
+++ ulp/ipoib_NDIS6_CM/kernel/ipoib_driver.cpp          (working copy)
@@ -1880,9 +1880,6 @@
                                                                ("ipoib_create_adapter returned status %d.\n", ib_status ) );
                                                return NDIS_STATUS_FAILURE;
                                }
-                              p_adapter->ipoib_state = IPOIB_INIT;
-                              IPOIB_PRINT( TRACE_LEVEL_INFORMATION,  IPOIB_DBG_SHUTTER,
-                              ("ipoib_state changed to IPOIB_INIT\n") );

                                status    = SetAttributes(p_adapter, h_adapter);
                                if (status != NDIS_STATUS_SUCCESS) {
Index: ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp
===================================================================
--- ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp                (revision 2986)
+++ ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp             (working copy)
@@ -849,15 +849,12 @@
                V.            NDIS calls to ipoib_restart that calls to shutter_alive. Shutter counter is 0 and we can start working
                */

-              if ( p_adapter->ipoib_state == IPOIB_INIT) {
-                              IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_RECV,
+             ASSERT( p_adapter->ipoib_state == IPOIB_UNINIT );
+             p_adapter->ipoib_state = IPOIB_INIT;
+             IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_SHUTTER,
                                ("Shutter shut, state = %d\n", p_adapter->ipoib_state));
-                              shutter_shut ( &p_adapter->recv_shutter );
-              }
-              else {
-                              IPOIB_PRINT( TRACE_LEVEL_WARNING, IPOIB_DBG_RECV,
-                              ("*****Shutter wasn't shut, state = %d*****\n", p_adapter->ipoib_state));
-              }
+             shutter_shut ( &p_adapter->recv_shutter );
+
                IPOIB_EXIT( IPOIB_DBG_INIT );
                return IB_SUCCESS;
 }

From: Fab Tillier [mailto:ftillier at microsoft.com]
Sent: Wednesday, November 10, 2010 7:21 PM
To: Alex Naslednikov; ofw at lists.openfabrics.org
Subject: RE: [ofw] [Patch][IPoIB_NDIS6_CM] Recv shutter fix when init process fails

Seems like you included the wrong patch?

Alexander (XaleX) Naslednikov
SW Networking Team
Mellanox Technologies

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20101111/f95f2bab/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: YASP.patch
Type: application/octet-stream
Size: 2628 bytes
Desc: YASP.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20101111/f95f2bab/attachment.obj>


More information about the ofw mailing list