[ofw] [Patch] Adding instrumental code for reset flow
Alex Naslednikov
xalex at mellanox.co.il
Tue Nov 23 00:16:12 PST 2010
New counters added; no functionality changes
Signed-off by: Alexander Naslednikov (xalex at mellanox.co.il)
Index: ulp/ipoib_NDIS6_CM/kernel/ipoib_adapter.cpp
===================================================================
--- ulp/ipoib_NDIS6_CM/kernel/ipoib_adapter.cpp (revision 3000)
+++ ulp/ipoib_NDIS6_CM/kernel/ipoib_adapter.cpp (working copy)
@@ -51,7 +51,10 @@
#define FOUR_X_IN_100BPS 100000000
#define TWELVE_X_IN_100BPS 300000000
+extern ULONG g_reset;
+extern ULONG g_reset_complete;
+
/* Declarations */
static void
adapter_construct(
@@ -139,6 +142,9 @@
("ipoib_state remained IPOIB_PAUSED and will be changed at ipoib_restart()\n") );
}
KeReleaseInStackQueuedSpinLock( &hdl );
+
+ ++g_reset_complete;
+ ASSERT( g_reset == g_reset_complete );
p_adapter->reset = FALSE;
NdisMResetComplete(
@@ -1067,7 +1073,7 @@
}
else
{
- // This sittuation happened in real life:
+ // 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 );
@@ -1075,6 +1081,8 @@
("ipoib_state remained IPOIB_PAUSED and will be changed at ipoib_restart()\n") );
}
KeReleaseInStackQueuedSpinLock( &hdl );
+ ++g_reset_complete;
+ ASSERT( g_reset == g_reset_complete );
}
IPOIB_EXIT( IPOIB_DBG_INIT );
@@ -1762,4 +1770,4 @@
cl_spinlock_release( &p_adapter->send_stat_lock );
IPOIB_EXIT( IPOIB_DBG_STAT );
-}
+}
\ No newline at end of file
Alexander (XaleX) Naslednikov
SW Networking Team
Mellanox Technologies
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20101123/9d900d9f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reset_instrumental_code_ofw.patch
Type: application/octet-stream
Size: 1546 bytes
Desc: reset_instrumental_code_ofw.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20101123/9d900d9f/attachment.obj>
More information about the ofw
mailing list