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

Alex Naslednikov xalex at mellanox.co.il
Sun Nov 14 02:19:17 PST 2010


Thank you.
I applied this patch at 2987 with small change at __ipoib_init() function:
It can be called also from ipoib_pnp_cb() during reset process.
Thus, instead of

             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 );

The following code should be:
if ( 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_INFORMATION, IPOIB_DBG_SHUTTER,
                                ("Shutter wasn't shut, state = %d\n", p_adapter->ipoib_state));
}

From: Smith, Stan [mailto:stan.smith at intel.com]
Sent: Thursday, November 11, 2010 9:20 PM
To: Alex Naslednikov; Fab Tillier; ofw at lists.openfabrics.org
Subject: RE: [ofw] [Patch][IPoIB_NDIS6_CM] Recv shutter fix when init process fails

Hello,
  Patch applies OK.
No observed problems in regression testing: dapl, ftp, disable/enable, shutdown, uninstall.
Thumbs-up!

stan.

________________________________
From: ofw-bounces at lists.openfabrics.org [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Alex Naslednikov
Sent: Thursday, November 11, 2010 5:18 AM
To: Fab Tillier; ofw at lists.openfabrics.org
Subject: Re: [ofw] [Patch][IPoIB_NDIS6_CM] Recv shutter fix when init process fails
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/20101114/d12bb2de/attachment.html>


More information about the ofw mailing list