[ofw] [PATCH] ipoib-CM 12 of 13
Smith, Stan
stan.smith at intel.com
Tue Jan 11 18:32:11 PST 2011
signed-off-by: stan smith <stan.smith at intel.com>
--- A/ulp/ipoib_NDIS6_CM/kernel/ipoib_adapter.cpp Tue Jan 11 17:58:58 2011
+++ B/ulp/ipoib_NDIS6_CM/kernel/ipoib_adapter.cpp Tue Jan 11 16:22:45 2011
@@ -33,7 +33,6 @@
#include <precompile.h>
-
#if defined(EVENT_TRACING)
#ifdef offsetof
#undef offsetof
@@ -565,10 +564,10 @@
cl_qpool_destroy( &p_adapter->item_pool );
cl_spinlock_destroy( &p_adapter->recv_stat_lock );
cl_spinlock_destroy( &p_adapter->send_stat_lock );
- cl_obj_deinit( p_obj );
cl_perf_destroy( &p_adapter->perf, TRUE );
+ cl_obj_deinit( p_obj );
cl_free( p_adapter );
IPOIB_EXIT( IPOIB_DBG_INIT );
@@ -660,8 +659,9 @@
sizeof(link_state));
NdisMIndicateStatusEx(p_adapter->h_adapter,&status_indication);
- IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_INIT,
- ("Link DOWN!\n") );
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_PNP,
+ ("Link DOWN Port[%d]!\n",
+ (p_adapter->p_port ? p_adapter->p_port->port_num : -1)) );
}
@@ -834,7 +834,8 @@
NDIS_STATUS_LINK_STATE,
(PVOID)&link_state,
sizeof(link_state));
- IPOIB_PRINT( TRACE_LEVEL_ERROR, IPOIB_DBG_INIT, ("Indicate DISCONNECT\n") );
+ IPOIB_PRINT( TRACE_LEVEL_ERROR, IPOIB_DBG_PNP,
+ ("Indicate DISCONNECT\n") );
NdisMIndicateStatusEx(p_adapter->h_adapter,&status_indication);
}
}
@@ -847,7 +848,7 @@
break;
default:
- IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_INIT,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_PNP,
("IPOIB: Received unhandled PnP event 0x%x (%s)\n",
p_pnp_rec->pnp_event, ib_get_pnp_event_str( p_pnp_rec->pnp_event )) );
/* Fall through. */
@@ -912,10 +913,9 @@
NdisMIndicateStatusEx(p_adapter->h_adapter,&status_indication);
- IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_INIT,
- ("Link DOWN!\n") );
- IPOIB_PRINT( TRACE_LEVEL_ERROR, IPOIB_DBG_INIT,
- ("Indicate DISCONNECT\n") );
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_PNP,
+ ("Link DOWN! Port[%d]\nIndicate DISCONNECT\n",
+ p_adapter->p_port->port_num) );
ipoib_port_down( p_adapter->p_port );
/* Fall through. */
@@ -1039,7 +1039,8 @@
// Notify that reset started and disable other shutter_shut
p_adapter->ipoib_state |= IPOIB_RESET_OR_DOWN;
IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_SHUTTER,
- ("[%I64u] ipoib_state was IPOIB_RUNNING and IPOIB_RESET_OR_DOWN flag was set \n", cl_get_time_stamp()) );
+ ("[%I64u] ipoib_state was IPOIB_RUNNING and IPOIB_RESET_OR_DOWN "
+ "flag was set\n", cl_get_time_stamp()) );
}
KeReleaseInStackQueuedSpinLock( &hdl );
status = p_adapter->p_ifc->dereg_pnp( h_pnp, __ipoib_pnp_dereg );
@@ -1056,7 +1057,8 @@
if ( status != IB_NOT_DONE )
{
- //do not call to __ipoib_complete_reset, because we return completion status directly from here
+ // do not call __ipoib_complete_reset, because we return completion
+ // status directly from here
p_adapter->reset = FALSE;
KeAcquireInStackQueuedSpinLock( &g_ipoib.lock, &hdl );
@@ -1067,17 +1069,20 @@
{
shutter_alive( &p_adapter->recv_shutter );
IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_SHUTTER,
- ("ipoib_state changed to IPOIB_RUNNING after the IPOIB_RESET_OR_DOWN flag was cleared\n") );
-
+ ("ipoib_state changed to IPOIB_RUNNING after the IPOIB_RESET_OR_DOWN"
+ " flag was cleared\n") );
}
else
{
// This situation happened in real life:
- // NDIS called to reset and right after to pause, before the reset was completed
- // Thus, when ipoib will try to complete reset, state may be already changed to IPOIB_PAUSE
- ASSERT( p_adapter->ipoib_state == IPOIB_PAUSED );
+ // NDIS called to reset and right after to pause, before the reset was
+ // completed.
+ // Thus, ipoib will try to complete reset, state may be already
+ // changed to IPOIB_PAUSE
+ ASSERT( p_adapter->ipoib_state == IPOIB_PAUSED );
IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_SHUTTER,
- ("ipoib_state remained IPOIB_PAUSED and will be changed at ipoib_restart()\n") );
+ ("ipoib_state remained IPOIB_PAUSED and will be changed at "
+ "ipoib_restart()\n") );
}
KeReleaseInStackQueuedSpinLock( &hdl );
++g_reset_complete;
@@ -1116,10 +1121,11 @@
ib_pnp_event_t state;
IPOIB_ENTER( IPOIB_DBG_INIT );
+
IPOIB_PRINT( TRACE_LEVEL_ERROR, IPOIB_DBG_ERROR,
- ("[%I64u] Got RESET\n", cl_get_time_stamp()) );
- IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_SHUTTER,
- ("[%I64u] Got RESET\n", cl_get_time_stamp()) );
+ ("[%I64u] Got RESET\n", cl_get_time_stamp()) );
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_SHUTTER,
+ ("[%I64u] Got RESET\n", cl_get_time_stamp()) );
p_adapter = (ipoib_adapter_t*)context;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ipoib_adapter.cpp.patch
Type: application/octet-stream
Size: 4876 bytes
Desc: ipoib_adapter.cpp.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20110111/2548bc14/attachment.obj>
More information about the ofw
mailing list