<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v =
"urn:schemas-microsoft-com:vml" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word" xmlns:x =
"urn:schemas-microsoft-com:office:excel" xmlns:p =
"urn:schemas-microsoft-com:office:powerpoint" xmlns:a =
"urn:schemas-microsoft-com:office:access" xmlns:dt =
"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s =
"uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs =
"urn:schemas-microsoft-com:rowset" xmlns:z = "#RowsetSchema" xmlns:b =
"urn:schemas-microsoft-com:office:publisher" xmlns:ss =
"urn:schemas-microsoft-com:office:spreadsheet" xmlns:c =
"urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:odc =
"urn:schemas-microsoft-com:office:odc" xmlns:oa =
"urn:schemas-microsoft-com:office:activation" xmlns:html =
"http://www.w3.org/TR/REC-html40" xmlns:q =
"http://schemas.xmlsoap.org/soap/envelope/" xmlns:rtc =
"http://microsoft.com/officenet/conferencing" XMLNS:D = "DAV:" XMLNS:Repl =
"http://schemas.microsoft.com/repl/" xmlns:mt =
"http://schemas.microsoft.com/sharepoint/soap/meetings/" xmlns:x2 =
"http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ppda =
"http://www.passport.com/NameSpace.xsd" xmlns:ois =
"http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir =
"http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds =
"http://www.w3.org/2000/09/xmldsig#" xmlns:dsp =
"http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc =
"http://schemas.microsoft.com/data/udc" xmlns:xsd =
"http://www.w3.org/2001/XMLSchema" xmlns:sub =
"http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" xmlns:ec =
"http://www.w3.org/2001/04/xmlenc#" xmlns:sp =
"http://schemas.microsoft.com/sharepoint/" xmlns:sps =
"http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi =
"http://www.w3.org/2001/XMLSchema-instance" xmlns:udcs =
"http://schemas.microsoft.com/data/udc/soap" xmlns:udcxf =
"http://schemas.microsoft.com/data/udc/xmlfile" xmlns:udcp2p =
"http://schemas.microsoft.com/data/udc/parttopart" xmlns:wf =
"http://schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:dsss =
"http://schemas.microsoft.com/office/2006/digsig-setup" xmlns:dssi =
"http://schemas.microsoft.com/office/2006/digsig" xmlns:mdssi =
"http://schemas.openxmlformats.org/package/2006/digital-signature" xmlns:mver =
"http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:m =
"http://schemas.microsoft.com/office/2004/12/omml" xmlns:mrels =
"http://schemas.openxmlformats.org/package/2006/relationships" xmlns:spwp =
"http://microsoft.com/sharepoint/webpartpages" xmlns:ex12t =
"http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ex12m =
"http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:pptsl =
"http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/" xmlns:spsl =
"http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService"
XMLNS:Z = "urn:schemas-microsoft-com:" xmlns:st = ""><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18928"><!--[if !mso]>
<STYLE>v\:* {
BEHAVIOR: url(#default#VML)
}
o\:* {
BEHAVIOR: url(#default#VML)
}
w\:* {
BEHAVIOR: url(#default#VML)
}
.shape {
BEHAVIOR: url(#default#VML)
}
</STYLE>
<![endif]-->
<STYLE>@font-face {
font-family: Calibri;
}
@font-face {
font-family: Tahoma;
}
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.0in 1.0in 1.0in; }
P.MsoNormal {
MARGIN: 0in 0in 0pt; FONT-FAMILY: "Calibri","sans-serif"; FONT-SIZE: 11pt
}
LI.MsoNormal {
MARGIN: 0in 0in 0pt; FONT-FAMILY: "Calibri","sans-serif"; FONT-SIZE: 11pt
}
DIV.MsoNormal {
MARGIN: 0in 0in 0pt; FONT-FAMILY: "Calibri","sans-serif"; FONT-SIZE: 11pt
}
A:link {
COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
A:visited {
COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
P.MsoListParagraph {
MARGIN: 0in 0in 0pt 0.5in; FONT-FAMILY: "Calibri","sans-serif"; FONT-SIZE: 11pt; mso-style-priority: 34
}
LI.MsoListParagraph {
MARGIN: 0in 0in 0pt 0.5in; FONT-FAMILY: "Calibri","sans-serif"; FONT-SIZE: 11pt; mso-style-priority: 34
}
DIV.MsoListParagraph {
MARGIN: 0in 0in 0pt 0.5in; FONT-FAMILY: "Calibri","sans-serif"; FONT-SIZE: 11pt; mso-style-priority: 34
}
SPAN.EmailStyle17 {
FONT-FAMILY: "Calibri","sans-serif"; COLOR: windowtext; mso-style-type: personal
}
SPAN.EmailStyle18 {
FONT-FAMILY: "Calibri","sans-serif"; COLOR: #1f497d; mso-style-type: personal
}
SPAN.EmailStyle19 {
FONT-FAMILY: "Calibri","sans-serif"; COLOR: #1f497d; mso-style-type: personal-reply
}
.MsoChpDefault {
FONT-SIZE: 10pt; mso-style-type: export-only
}
DIV.Section1 {
page: Section1
}
OL {
MARGIN-BOTTOM: 0in
}
UL {
MARGIN-BOTTOM: 0in
}
</STYLE>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></HEAD>
<BODY lang=EN-US link=blue vLink=purple>
<DIV dir=ltr align=left><SPAN class=898541023-01112010><FONT color=#0000ff
size=2 face=Arial>committed.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=898541023-01112010><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=898541023-01112010><FONT color=#0000ff
size=2 face=Arial>Revision: 2977<BR>Author: stansmith<BR>Date: 4:09:41 PM,
Monday, November 01, 2010<BR>Message:<BR>[IPoiB_NDIS6_CM]<BR>1. Main fix:
handling a situation when NDIS sends ‘pause’ command before the ‘reset’ command
was completed<BR>2. Debug prints improvements<BR>3. Time notification was added
to IPOIB_DBG_SHUTTER printouts, because of timestamp importance in this
case.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=898541023-01112010><FONT color=#0000ff
size=2 face=Arial> These debug prints are not in data path, so it’s
safe to use them here.</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV dir=ltr align=left><SPAN class=898541023-01112010><FONT color=#0000ff
size=2 face=Arial>signed-off-by: Alex Naslednikov [xalex@mellanox.co.il],
stan.smith <<A
href="mailto:stan.smith@intel.com">stan.smith@intel.com</A>></FONT></SPAN></DIV>
<DIV> </DIV>
<DIV dir=ltr align=left><SPAN class=898541023-01112010><FONT color=#0000ff
size=2 face=Arial>----<BR>Modified :
/gen1/branches/WOF2-3/ulp/ipoib_NDIS6_CM/kernel/ipoib_adapter.cpp<BR>Modified :
/gen1/branches/WOF2-3/ulp/ipoib_NDIS6_CM/kernel/ipoib_adapter.h<BR>Modified :
/gen1/branches/WOF2-3/ulp/ipoib_NDIS6_CM/kernel/ipoib_debug.h<BR>Modified :
/gen1/branches/WOF2-3/ulp/ipoib_NDIS6_CM/kernel/ipoib_driver.cpp<BR>Modified :
/gen1/trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_adapter.cpp<BR>Modified :
/gen1/trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_adapter.h<BR>Modified :
/gen1/trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_debug.h<BR>Modified :
/gen1/trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_driver.cpp</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV dir=ltr align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> Alex Naslednikov
[mailto:xalex@mellanox.co.il] <BR><B>Sent:</B> Thursday, October 28, 2010 7:06
AM<BR><B>To:</B> Smith, Stan; ofw@lists.openfabrics.org<BR><B>Subject:</B> RE:
[ofw] [IPoIB_NDIS6_CM][Patch] Improving shutter mechanism for recv
flow<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=Section1>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">Please, see the revisited
version of the patch, which includes:<o:p></o:p></SPAN></P>
<P style="TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"
class=MsoListParagraph><![if !supportLists]><SPAN style="COLOR: #1f497d"><SPAN
style="mso-list: Ignore">1.<SPAN
style="FONT: 7pt 'Times New Roman'">
</SPAN></SPAN></SPAN><![endif]><SPAN dir=ltr></SPAN><SPAN
style="COLOR: #1f497d">Main fix: handling a situation when NDIS sends ‘pause’
command before the ‘reset’ command was completed<o:p></o:p></SPAN></P>
<P style="TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"
class=MsoListParagraph><![if !supportLists]><SPAN style="COLOR: #1f497d"><SPAN
style="mso-list: Ignore">2.<SPAN
style="FONT: 7pt 'Times New Roman'">
</SPAN></SPAN></SPAN><![endif]><SPAN dir=ltr></SPAN><SPAN
style="COLOR: #1f497d">Debug prints improvements<o:p></o:p></SPAN></P>
<P style="TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"
class=MsoListParagraph><![if !supportLists]><SPAN style="COLOR: #1f497d"><SPAN
style="mso-list: Ignore">3.<SPAN
style="FONT: 7pt 'Times New Roman'">
</SPAN></SPAN></SPAN><![endif]><SPAN dir=ltr></SPAN><SPAN
style="COLOR: #1f497d">Time notification was added to IPOIB_DBG_SHUTTER
printouts, because of timestamp importance in this case. These debug prints are
not in data path, so it’s safe to use them here.<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">Index:
ulp/ipoib_NDIS6_CM/kernel/ipoib_adapter.cpp<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">===================================================================<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">---
ulp/ipoib_NDIS6_CM/kernel/ipoib_adapter.cpp
(revision 2975)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">+++
ulp/ipoib_NDIS6_CM/kernel/ipoib_adapter.cpp
(working copy)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">@@ -111,6 +111,40
@@<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
OUT
UINT
*p_len);<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">+static
void<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
__ipoib_complete_reset(<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
IN
ipoib_adapter_t*
const
p_adapter,<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
IN
NDIS_STATUS
Status ) <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">+{<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
KLOCK_QUEUE_HANDLE
hdl;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
KeAcquireInStackQueuedSpinLock( &g_ipoib.lock, &hdl
);<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
// Check if Reset flag is set or if adapter is in Paused
state<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
p_adapter->ipoib_state = p_adapter->ipoib_state &
~IPOIB_RESET_OR_DOWN;
<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
if ( p_adapter->ipoib_state == IPOIB_RUNNING )<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
{<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
shutter_alive( &p_adapter->recv_shutter );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
IPOIB_PRINT( TRACE_LEVEL_INFORMATION,
IPOIB_DBG_SHUTTER,<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
("ipoib_state changed to IPOIB_RUNNING after the IPOIB_RESET_OR_DOWN flag was
cleared\n") );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">+<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
}<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
else <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
{<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
// This sittuation happened in real life: <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
// NDIS called to reset and right after to pause, before the reset was
completed<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
// Thus, when ipoib will try to complete reset, state may be already changed to
IPOIB_PAUSE<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
ASSERT( p_adapter->ipoib_state == IPOIB_PAUSED );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
IPOIB_PRINT( TRACE_LEVEL_INFORMATION,
IPOIB_DBG_SHUTTER,<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
("ipoib_state remained IPOIB_PAUSED and will be changed at ipoib_restart()\n")
);<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
}<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
KeReleaseInStackQueuedSpinLock( &hdl );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
p_adapter->reset = FALSE;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
NdisMResetComplete(<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
p_adapter->h_adapter, Status, TRUE );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">+}<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">+<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> /* Implementation
*/<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d"> ib_api_status_t<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d"> ipoib_create_adapter(<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">@@ -800,9 +834,7
@@<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
if( p_adapter->reset && p_adapter->state != IB_PNP_PORT_INIT
)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
{<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">-
p_adapter->reset = FALSE;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">-
NdisMResetComplete(<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">-
p_adapter->h_adapter, NDIS_STATUS_SUCCESS, TRUE );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
__ipoib_complete_reset( p_adapter, NDIS_STATUS_SUCCESS );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
}<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
status = IB_SUCCESS;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
break;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">@@ -978,6 +1010,7
@@<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> {<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
ib_api_status_t
status;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
ib_pnp_handle_t
h_pnp;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
KLOCK_QUEUE_HANDLE
hdl;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
IPOIB_ENTER( IPOIB_DBG_INIT );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">@@ -992,8 +1025,19
@@<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
h_pnp = p_adapter->h_pnp;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
p_adapter->h_pnp = NULL;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
status = p_adapter->p_ifc->dereg_pnp( h_pnp, __ipoib_pnp_dereg
);<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
// Wait until NDIS will return all indicated NBLs that were
received<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">-
shutter_shut( &p_adapter->recv_shutter );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
// Avoid shutting the shutter twice<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
KeAcquireInStackQueuedSpinLock( &g_ipoib.lock, &hdl
);<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
if ( p_adapter->ipoib_state == IPOIB_RUNNING ) {<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
shutter_shut( &p_adapter->recv_shutter );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
// Notify that reset started and disable other
shutter_shut<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
p_adapter->ipoib_state |= IPOIB_RESET_OR_DOWN;
<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
IPOIB_PRINT( TRACE_LEVEL_INFORMATION,
IPOIB_DBG_SHUTTER,<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
("[%I64u] ipoib_state was IPOIB_RUNNING and IPOIB_RESET_OR_DOWN flag was set
\n", cl_get_time_stamp()) );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
}<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
KeReleaseInStackQueuedSpinLock( &hdl );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
if( status == IB_SUCCESS )<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
status = IB_NOT_DONE;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
}<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">@@ -1007,7 +1051,31
@@<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
p_adapter->reset = TRUE;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
}<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
else {<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">-
p_adapter->reset = FALSE;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
//do not call to __ipoib_complete_reset, because we return completion
status directly from here<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
p_adapter->reset = FALSE; <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
KeAcquireInStackQueuedSpinLock( &g_ipoib.lock, &hdl
);<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
// Check if Reset flag is set or if adapter is in Paused
state<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
p_adapter->ipoib_state = p_adapter->ipoib_state &
~IPOIB_RESET_OR_DOWN;
<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
if ( p_adapter->ipoib_state == IPOIB_RUNNING )<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
{<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
shutter_alive( &p_adapter->recv_shutter );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
IPOIB_PRINT( TRACE_LEVEL_INFORMATION,
IPOIB_DBG_SHUTTER,<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
("ipoib_state changed to IPOIB_RUNNING after the IPOIB_RESET_OR_DOWN flag was
cleared\n") );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">+<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
}<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
else <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
{<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
// This sittuation happened in real life: <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
// NDIS called to reset and right after to pause, before the reset was
completed<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
// Thus, when ipoib will try to complete reset, state may be already changed to
IPOIB_PAUSE<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
ASSERT( p_adapter->ipoib_state == IPOIB_PAUSED );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
IPOIB_PRINT( TRACE_LEVEL_INFORMATION,
IPOIB_DBG_SHUTTER,<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
("ipoib_state remained IPOIB_PAUSED and will be changed at ipoib_restart()\n")
);<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
}<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
KeReleaseInStackQueuedSpinLock( &hdl );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
}<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
IPOIB_EXIT( IPOIB_DBG_INIT );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
return status;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">@@ -1042,7 +1110,9
@@<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
IPOIB_ENTER( IPOIB_DBG_INIT );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
IPOIB_PRINT( TRACE_LEVEL_ERROR, IPOIB_DBG_ERROR,<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">-
("Got RESET\n") );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
("[%I64u] Got RESET\n", cl_get_time_stamp()) );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_SHUTTER,<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
("[%I64u] Got RESET\n", cl_get_time_stamp()) );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
p_adapter = (ipoib_adapter_t*)context;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">@@ -1074,19 +1144,15
@@<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
status = __ipoib_pnp_reg( p_adapter, IB_PNP_FLAG_REG_COMPLETE
);<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
if( status != IB_SUCCESS )<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
{<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">-
p_adapter->reset = FALSE;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
IPOIB_PRINT( TRACE_LEVEL_ERROR, IPOIB_DBG_ERROR,<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
("__ipoib_pnp_reg returned %s\n",<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
p_adapter->p_ifc->get_err_str( status )) );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">-
NdisMResetComplete( <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">-
p_adapter->h_adapter, NDIS_STATUS_HARD_ERRORS, TRUE );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
__ipoib_complete_reset( p_adapter, NDIS_STATUS_HARD_ERRORS
);<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
}<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
}<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
else<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
{<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">-
p_adapter->reset = FALSE;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">-
NdisMResetComplete(<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">-
p_adapter->h_adapter, NDIS_STATUS_SUCCESS, TRUE );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
__ipoib_complete_reset( p_adapter, NDIS_STATUS_SUCCESS );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
status = IB_SUCCESS;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
}<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">@@ -1261,10 +1327,7
@@<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
if( p_adapter->reset )<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
{<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">-
//ASSERT(FALSE);<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">-
p_adapter->reset = FALSE;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">-
NdisMResetComplete(<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">-
p_adapter->h_adapter, NDIS_STATUS_SUCCESS, TRUE );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
__ipoib_complete_reset( p_adapter, NDIS_STATUS_SUCCESS );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
}<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
IPOIB_EXIT( IPOIB_DBG_INIT );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">@@ -1323,9 +1386,7
@@<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
if( p_adapter->reset )<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
{<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">-
p_adapter->reset = FALSE;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">-
NdisMResetComplete(<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">-
p_adapter->h_adapter, NDIS_STATUS_SUCCESS, TRUE );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
__ipoib_complete_reset( p_adapter, NDIS_STATUS_SUCCESS );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
}<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
IPOIB_EXIT( IPOIB_DBG_INIT );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">Index:
ulp/ipoib_NDIS6_CM/kernel/ipoib_adapter.h<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">===================================================================<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">---
ulp/ipoib_NDIS6_CM/kernel/ipoib_adapter.h
(revision 2975)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">+++
ulp/ipoib_NDIS6_CM/kernel/ipoib_adapter.h
(working copy)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">@@ -70,14 +70,14
@@<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
CSUM_BYPASS<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> }
csum_flag_t;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">-typedef enum
_ipoib_state<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">-{<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">-
IPOIB_INIT = -1,<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">-
IPOIB_PAUSED,<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">-
IPOIB_PAUSING,<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">-
IPOIB_RUNNING<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">-}
ipoib_state_t;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">+typedef
uint32_t
ipoib_state_t;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+#define
IPOIB_INIT
1<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">+#define
IPOIB_PAUSED
2<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+#define
IPOIB_PAUSING
4<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+#define
IPOIB_RUNNING
8<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+#define
IPOIB_RESET_OR_DOWN 16<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">+<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> typedef struct
_ipoib_offloads_cap_ {<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
boolean_t
lso;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
boolean_t
send_chksum_offload;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">Index:
ulp/ipoib_NDIS6_CM/kernel/ipoib_debug.h<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">===================================================================<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">---
ulp/ipoib_NDIS6_CM/kernel/ipoib_debug.h
(revision 2975)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">+++
ulp/ipoib_NDIS6_CM/kernel/ipoib_debug.h
(working copy)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">@@ -73,7 +73,8
@@<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
WPP_DEFINE_BIT(IPOIB_DBG_OID) \<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
WPP_DEFINE_BIT(IPOIB_DBG_IOCTL) \<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
WPP_DEFINE_BIT(IPOIB_DBG_STAT) \<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">-
WPP_DEFINE_BIT(IPOIB_DBG_OBJ))<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
WPP_DEFINE_BIT(IPOIB_DBG_OBJ) \<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
WPP_DEFINE_BIT(IPOIB_DBG_SHUTTER))<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">@@ -103,20 +104,21
@@<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> /*<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> * Debug
macros<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> */<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">-#define
IPOIB_DBG_ERR
(1 << 0)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">-#define
IPOIB_DBG_INIT (1
<< 1)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">-#define
IPOIB_DBG_PNP (1
<< 2)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">-#define
IPOIB_DBG_SEND (1 <<
3)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">-#define
IPOIB_DBG_RECV (1 <<
4)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">-#define
IPOIB_DBG_ENDPT (1 <<
5)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">-#define
IPOIB_DBG_IB
(1 << 6)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">-#define
IPOIB_DBG_BUF (1
<< 7)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">-#define
IPOIB_DBG_MCAST (1 << 8)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">-#define
IPOIB_DBG_ALLOC (1 <<
9)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">-#define
IPOIB_DBG_OID
(1 << 10)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">-#define
IPOIB_DBG_IOCTL (1 <<
11)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">-#define
IPOIB_DBG_STAT (1 <<
12)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">-#define
IPOIB_DBG_OBJ
(1 << 13)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">+#define
IPOIB_DBG_ERR
(1 << 0)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">+#define
IPOIB_DBG_INIT
(1 << 1)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">+#define
IPOIB_DBG_PNP
(1 << 2)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">+#define
IPOIB_DBG_SEND
(1 << 3)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">+#define
IPOIB_DBG_RECV
(1 << 4)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">+#define
IPOIB_DBG_ENDPT
(1 << 5)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">+#define
IPOIB_DBG_IB
(1 << 6)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">+#define
IPOIB_DBG_BUF
(1 << 7)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">+#define
IPOIB_DBG_MCAST
(1 << 8)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">+#define
IPOIB_DBG_ALLOC
(1 << 9)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">+#define
IPOIB_DBG_OID
(1 << 10)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">+#define
IPOIB_DBG_IOCTL
(1 << 11)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">+#define
IPOIB_DBG_STAT
(1 << 12)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">+#define
IPOIB_DBG_OBJ
(1 << 13)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">+#define IPOIB_DBG_SHUTTER
(1 << 14)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> #define
IPOIB_DBG_ERROR (CL_DBG_ERROR |
IPOIB_DBG_ERR)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> #define
IPOIB_DBG_ALL
CL_DBG_ALL<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">Index:
ulp/ipoib_NDIS6_CM/kernel/ipoib_driver.cpp<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">===================================================================<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">---
ulp/ipoib_NDIS6_CM/kernel/ipoib_driver.cpp
(revision 2975)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">+++
ulp/ipoib_NDIS6_CM/kernel/ipoib_driver.cpp
(working copy)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">@@ -1877,6 +1877,8
@@<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
return NDIS_STATUS_FAILURE;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
}<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
p_adapter->ipoib_state = IPOIB_INIT;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
IPOIB_PRINT( TRACE_LEVEL_INFORMATION,
IPOIB_DBG_SHUTTER,<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
("ipoib_state changed to IPOIB_INIT\n") );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
status = SetAttributes(p_adapter,
h_adapter);<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
if (status != NDIS_STATUS_SUCCESS) {<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">@@ -3155,8 +3157,8
@@<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
p_adapter = (ipoib_adapter_t*)adapter_context;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
cl_obj_lock( &p_adapter->obj );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">-
if( p_adapter->ipoib_state == IPOIB_PAUSING ||<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">-
p_adapter->ipoib_state == IPOIB_PAUSED)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
if( p_adapter->ipoib_state & IPOIB_PAUSING ||<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
p_adapter->ipoib_state & IPOIB_PAUSED)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
{<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
status = NDIS_STATUS_PAUSED; <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
IPOIB_PRINT( TRACE_LEVEL_ERROR, IPOIB_DBG_ERROR,<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">@@ -3275,6 +3277,8
@@<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
IN
NDIS_HANDLE
adapter_context,<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
IN NDIS_SHUTDOWN_ACTION shutdown_action)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> {<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
KLOCK_QUEUE_HANDLE
hdl;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
IPOIB_ENTER( IPOIB_DBG_INIT ) ;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
UNUSED_PARAM( shutdown_action );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">@@ -3287,7 +3291,19
@@<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
("Shutter shut, state = %d\n",
p_adapter->ipoib_state));<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_RECV,<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
("Shutter shut, state = %d\n",
p_adapter->ipoib_state));<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">-
shutter_shut ( &p_adapter->recv_shutter );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
// Wait until NDIS will return all indicated NBLs that were
received<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
// Avoid shutting the shutter twice<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
KeAcquireInStackQueuedSpinLock( &g_ipoib.lock, &hdl
);<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
ASSERT ( !(p_adapter->ipoib_state & IPOIB_RESET_OR_DOWN)
);<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
if ( p_adapter->ipoib_state == IPOIB_RUNNING ) { //ensure that there was no
active reset<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
shutter_shut( &p_adapter->recv_shutter );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
// Notify that shutter was already shut<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
p_adapter->ipoib_state |= IPOIB_RESET_OR_DOWN;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
ASSERT( p_adapter->ipoib_state == IPOIB_RUNNING
);
<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
IPOIB_PRINT( TRACE_LEVEL_INFORMATION,
IPOIB_DBG_SHUTTER,<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
("ipoib_state was IPOIB_RUNNING and IPOIB_RESET_OR_DOWN flag was set\n")
);<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
}<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
KeReleaseInStackQueuedSpinLock( &hdl );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
}<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
IPOIB_EXIT( IPOIB_DBG_INIT );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">@@ -3965,6 +3981,7
@@<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
cl_free( context );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> }<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">+<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> static NDIS_STATUS
<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d"> ipoib_pause(<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
IN NDIS_HANDLE
adapter_context,
<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">@@ -3972,30 +3989,42
@@<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> {<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
ipoib_adapter_t
*p_adapter;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
KLOCK_QUEUE_HANDLE
hdl;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
ipoib_state_t
prev_state;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">-
UNREFERENCED_PARAMETER(pause_parameters);<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
UNREFERENCED_PARAMETER( pause_parameters );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
IPOIB_ENTER( IPOIB_DBG_INIT );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">-
CL_ASSERT(adapter_context);<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
CL_ASSERT( adapter_context );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
p_adapter = (ipoib_adapter_t*)adapter_context;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">-
CL_ASSERT(p_adapter->ipoib_state == IPOIB_RUNNING);<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">-<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
KeAcquireInStackQueuedSpinLock( &g_ipoib.lock, &hdl
);<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
prev_state = p_adapter->ipoib_state;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
CL_ASSERT ( prev_state & IPOIB_RUNNING );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
p_adapter->ipoib_state = IPOIB_PAUSING;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
IPOIB_PRINT( TRACE_LEVEL_INFORMATION,
IPOIB_DBG_SHUTTER,<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
("[%I64u]ipoib_state changed to IPOIB_PAUSING\n", cl_get_time_stamp())
);<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
KeReleaseInStackQueuedSpinLock( &hdl );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">-
if (p_adapter->p_port) {<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
if ( p_adapter->p_port ) {<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
cl_spinlock_acquire( &p_adapter->p_port->send_lock
);<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">-
ipoib_port_resume(p_adapter->p_port,FALSE);<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
ipoib_port_resume( p_adapter->p_port,FALSE );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
cl_spinlock_release( &p_adapter->p_port->send_lock
);<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
}<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
if ( prev_state == IPOIB_RUNNING ) { //i.e there was no active
reset<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_RECV,<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
("Shutter shut, state = %d\n", p_adapter->ipoib_state)
);<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
shutter_shut ( &p_adapter->recv_shutter );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
}<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
else {<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
ASSERT ( prev_state & IPOIB_RESET_OR_DOWN);<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
IPOIB_PRINT_EXIT( TRACE_LEVEL_ERROR, IPOIB_DBG_ERROR,<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
("[%I64u]Got pause during reset or got reset when IPoIB port wasn't active\n",
cl_get_time_stamp()) );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
}<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">-
IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_RECV,<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">-
("Shutter shut, state = %d\n",
p_adapter->ipoib_state));<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">-
shutter_shut ( &p_adapter->recv_shutter );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">-
<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
KeAcquireInStackQueuedSpinLock( &g_ipoib.lock, &hdl
);<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
p_adapter->ipoib_state = IPOIB_PAUSED;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
IPOIB_PRINT( TRACE_LEVEL_INFORMATION,
IPOIB_DBG_SHUTTER,<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
("[%I64u]ipoib_state changed to IPOIB_PAUSED\n", cl_get_time_stamp())
);<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
KeReleaseInStackQueuedSpinLock( &hdl );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
IPOIB_EXIT( IPOIB_DBG_INIT );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">@@ -4025,18 +4054,20
@@<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
// Check to see if we need to change any attributes<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
}<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">-
if ( (p_adapter->ipoib_state == IPOIB_PAUSED) || (p_adapter->ipoib_state
== IPOIB_INIT) ) {<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
if ( p_adapter->ipoib_state & (IPOIB_PAUSED | IPOIB_INIT) )
{<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_RECV,<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">-
("Shutter Alive, ipoib_state = %d\n",
p_adapter->ipoib_state));<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
("[%I64u]Shutter Alive, ipoib_state = %d\n", cl_get_time_stamp(),
p_adapter->ipoib_state));<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
shutter_alive( &p_adapter->recv_shutter );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
}<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
else {<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">-
IPOIB_PRINT( TRACE_LEVEL_WARNING, IPOIB_DBG_RECV,<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
IPOIB_PRINT( TRACE_LEVEL_WARNING, IPOIB_DBG_SHUTTER,<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
("*****Shutter Was not \"Alived\", state = %d*****\n",
p_adapter->ipoib_state));<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
}<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
KeAcquireInStackQueuedSpinLock( &g_ipoib.lock, &hdl
);<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
p_adapter->ipoib_state = IPOIB_RUNNING;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
IPOIB_PRINT( TRACE_LEVEL_INFORMATION,
IPOIB_DBG_SHUTTER,<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">+
("[%I64u]ipoib_state changed to IPOIB_RUNNING\n",cl_get_time_stamp())
);<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
KeReleaseInStackQueuedSpinLock( &hdl );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"> <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"><o:p> </o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"><o:p> </o:p></SPAN></P>
<DIV>
<DIV
style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<P class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">From:</SPAN></B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt"> Smith, Stan
[mailto:stan.smith@intel.com] <BR><B>Sent:</B> Wednesday, October 27, 2010 5:26
PM<BR><B>To:</B> Alex Naslednikov; ofw@lists.openfabrics.org<BR><B>Subject:</B>
RE: [ofw] [IPoIB_NDIS6_CM][Patch] Improving shutter mechanism for recv
flow<o:p></o:p></SPAN></P></DIV></DIV>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: blue; FONT-SIZE: 10pt">Hello,</SPAN><SPAN
style="FONT-FAMILY: 'Times New Roman','serif'; FONT-SIZE: 12pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: blue; FONT-SIZE: 10pt">
Patch tests out with no problems - expected behavior.</SPAN><SPAN
style="FONT-FAMILY: 'Times New Roman','serif'; FONT-SIZE: 12pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: blue; FONT-SIZE: 10pt">Would
you like for me to svn commit to trunk and WOF2-3 branch?</SPAN><SPAN
style="FONT-FAMILY: 'Times New Roman','serif'; FONT-SIZE: 12pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Times New Roman','serif'; FONT-SIZE: 12pt"> <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: blue; FONT-SIZE: 10pt">stan.</SPAN><SPAN
style="FONT-FAMILY: 'Times New Roman','serif'; FONT-SIZE: 12pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Times New Roman','serif'; FONT-SIZE: 12pt"><o:p> </o:p></SPAN></P>
<DIV style="TEXT-ALIGN: center" class=MsoNormal align=center><SPAN
style="FONT-FAMILY: 'Times New Roman','serif'; FONT-SIZE: 12pt">
<HR align=center SIZE=2 width="100%">
</SPAN></DIV>
<P style="MARGIN-BOTTOM: 12pt" class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">From:</SPAN></B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">
ofw-bounces@lists.openfabrics.org [mailto:ofw-bounces@lists.openfabrics.org]
<B>On Behalf Of </B>Alex Naslednikov<BR><B>Sent:</B> Tuesday, October 26, 2010
2:59 AM<BR><B>To:</B> Alex Naslednikov;
ofw@lists.openfabrics.org<BR><B>Subject:</B> Re: [ofw] [IPoIB_NDIS6_CM][Patch]
Improving shutter mechanism for recv flow</SPAN><SPAN
style="FONT-FAMILY: 'Times New Roman','serif'; FONT-SIZE: 12pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">Now with the patch attached by
file<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"><o:p> </o:p></SPAN></P>
<DIV>
<DIV
style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<P class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">From:</SPAN></B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">
ofw-bounces@lists.openfabrics.org [mailto:ofw-bounces@lists.openfabrics.org]
<B>On Behalf Of </B>Alex Naslednikov<BR><B>Sent:</B> Tuesday, October 26, 2010
11:57 AM<BR><B>To:</B> ofw@lists.openfabrics.org<BR><B>Subject:</B> [ofw]
[IPoIB_NDIS6_CM][Patch] Improving shutter mechanism for recv
flow<o:p></o:p></SPAN></P></DIV></DIV>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal>This patch avoids the situation when the recv shutter can be
shut twice.<o:p></o:p></P>
<P class=MsoNormal>It was tested with regression run that failed beforehand
along with manual debug <o:p></o:p></P>
<P class=MsoNormal>(forcing NDIS to call to ipoib_reset() )<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal>Signed-off by: Alexander Naslednikov (xalex at
mellanox.co.il)<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal>Index:
ulp/ipoib_NDIS6_CM/kernel/ipoib_adapter.cpp<o:p></o:p></P>
<P
class=MsoNormal>===================================================================<o:p></o:p></P>
<P class=MsoNormal>---
ulp/ipoib_NDIS6_CM/kernel/ipoib_adapter.cpp
(revision 2975)<o:p></o:p></P>
<P class=MsoNormal>+++
ulp/ipoib_NDIS6_CM/kernel/ipoib_adapter.cpp
(working copy)<o:p></o:p></P>
<P class=MsoNormal>@@ -111,6 +111,28 @@<o:p></o:p></P>
<P
class=MsoNormal>
OUT
UINT
*p_len);<o:p></o:p></P>
<P class=MsoNormal> <o:p></o:p></P>
<P class=MsoNormal> <o:p></o:p></P>
<P class=MsoNormal>+static inline void<o:p></o:p></P>
<P
class=MsoNormal>+
__ipoib_complete_reset(<o:p></o:p></P>
<P
class=MsoNormal>+
IN
ipoib_adapter_t*
const
p_adapter,<o:p></o:p></P>
<P
class=MsoNormal>+
IN
NDIS_STATUS
Status ) <o:p></o:p></P>
<P class=MsoNormal>+{<o:p></o:p></P>
<P
class=MsoNormal>+
KLOCK_QUEUE_HANDLE
hdl;<o:p></o:p></P>
<P
class=MsoNormal>+
<o:p></o:p></P>
<P
class=MsoNormal>+
KeAcquireInStackQueuedSpinLock( &g_ipoib.lock, &hdl );<o:p></o:p></P>
<P
class=MsoNormal>+
if ( p_adapter->ipoib_state & ~IPOIB_RESET_OR_DOWN ) <o:p></o:p></P>
<P
class=MsoNormal>+
{<o:p></o:p></P>
<P
class=MsoNormal>+
//Alive the shutter even if the status was not
NDIS_STATUS_SUCCESS<o:p></o:p></P>
<P
class=MsoNormal>+
shutter_alive( &p_adapter->recv_shutter );<o:p></o:p></P>
<P
class=MsoNormal>+
p_adapter->ipoib_state = p_adapter->ipoib_state &
~IPOIB_RESET_OR_DOWN;<o:p></o:p></P>
<P
class=MsoNormal>+
ASSERT( p_adapter->ipoib_state == IPOIB_RUNNING
);
<o:p></o:p></P>
<P
class=MsoNormal>+
}<o:p></o:p></P>
<P
class=MsoNormal>+
KeReleaseInStackQueuedSpinLock( &hdl );<o:p></o:p></P>
<P
class=MsoNormal>+
<o:p></o:p></P>
<P
class=MsoNormal>+
p_adapter->reset = FALSE;<o:p></o:p></P>
<P
class=MsoNormal>+
NdisMResetComplete(<o:p></o:p></P>
<P
class=MsoNormal>+
p_adapter->h_adapter, Status, TRUE );<o:p></o:p></P>
<P class=MsoNormal>+}<o:p></o:p></P>
<P class=MsoNormal>+<o:p></o:p></P>
<P class=MsoNormal> /* Implementation */<o:p></o:p></P>
<P class=MsoNormal> ib_api_status_t<o:p></o:p></P>
<P class=MsoNormal> ipoib_create_adapter(<o:p></o:p></P>
<P class=MsoNormal>@@ -800,9 +822,7 @@<o:p></o:p></P>
<P class=MsoNormal> <o:p></o:p></P>
<P
class=MsoNormal>
if( p_adapter->reset && p_adapter->state != IB_PNP_PORT_INIT
)<o:p></o:p></P>
<P
class=MsoNormal>
{<o:p></o:p></P>
<P
class=MsoNormal>-
p_adapter->reset = FALSE;<o:p></o:p></P>
<P
class=MsoNormal>-
NdisMResetComplete(<o:p></o:p></P>
<P
class=MsoNormal>-
p_adapter->h_adapter, NDIS_STATUS_SUCCESS, TRUE );<o:p></o:p></P>
<P
class=MsoNormal>+
__ipoib_complete_reset( p_adapter, NDIS_STATUS_SUCCESS );<o:p></o:p></P>
<P
class=MsoNormal>
}<o:p></o:p></P>
<P
class=MsoNormal>
status = IB_SUCCESS;<o:p></o:p></P>
<P
class=MsoNormal>
break;<o:p></o:p></P>
<P class=MsoNormal>@@ -978,6 +998,7 @@<o:p></o:p></P>
<P class=MsoNormal> {<o:p></o:p></P>
<P
class=MsoNormal>
ib_api_status_t
status;<o:p></o:p></P>
<P
class=MsoNormal>
ib_pnp_handle_t
h_pnp;<o:p></o:p></P>
<P
class=MsoNormal>+
KLOCK_QUEUE_HANDLE
hdl;<o:p></o:p></P>
<P class=MsoNormal> <o:p></o:p></P>
<P
class=MsoNormal>
IPOIB_ENTER( IPOIB_DBG_INIT );<o:p></o:p></P>
<P class=MsoNormal> <o:p></o:p></P>
<P class=MsoNormal>@@ -992,8 +1013,17 @@<o:p></o:p></P>
<P
class=MsoNormal>
h_pnp = p_adapter->h_pnp;<o:p></o:p></P>
<P
class=MsoNormal>
p_adapter->h_pnp = NULL;<o:p></o:p></P>
<P
class=MsoNormal>
status = p_adapter->p_ifc->dereg_pnp( h_pnp, __ipoib_pnp_dereg
);<o:p></o:p></P>
<P
class=MsoNormal>+
<o:p></o:p></P>
<P
class=MsoNormal>
// Wait until NDIS will return all indicated NBLs that were
received<o:p></o:p></P>
<P
class=MsoNormal>-
shutter_shut( &p_adapter->recv_shutter );<o:p></o:p></P>
<P
class=MsoNormal>+
// Avoid shutting the shutter twice<o:p></o:p></P>
<P
class=MsoNormal>+
KeAcquireInStackQueuedSpinLock( &g_ipoib.lock, &hdl );<o:p></o:p></P>
<P
class=MsoNormal>+
if ( p_adapter->ipoib_state == IPOIB_RUNNING ) {<o:p></o:p></P>
<P
class=MsoNormal>+
shutter_shut( &p_adapter->recv_shutter );<o:p></o:p></P>
<P
class=MsoNormal>+
// Notify that reset started and disable other shutter_shut<o:p></o:p></P>
<P
class=MsoNormal>+
p_adapter->ipoib_state |= IPOIB_RESET_OR_DOWN;<o:p></o:p></P>
<P
class=MsoNormal>+
}<o:p></o:p></P>
<P
class=MsoNormal>+
KeReleaseInStackQueuedSpinLock( &hdl );<o:p></o:p></P>
<P
class=MsoNormal>+
<o:p></o:p></P>
<P
class=MsoNormal>
if( status == IB_SUCCESS )<o:p></o:p></P>
<P
class=MsoNormal>
status = IB_NOT_DONE;<o:p></o:p></P>
<P
class=MsoNormal>
}<o:p></o:p></P>
<P class=MsoNormal>@@ -1007,7 +1037,12 @@<o:p></o:p></P>
<P
class=MsoNormal>
p_adapter->reset = TRUE;<o:p></o:p></P>
<P
class=MsoNormal>
}<o:p></o:p></P>
<P
class=MsoNormal>
else {<o:p></o:p></P>
<P
class=MsoNormal>-
p_adapter->reset = FALSE;<o:p></o:p></P>
<P
class=MsoNormal>+
//do not call to __ipoib_complete_reset, because we return completion
status directly from here<o:p></o:p></P>
<P
class=MsoNormal>+
p_adapter->reset = FALSE; <o:p></o:p></P>
<P
class=MsoNormal>+
KeAcquireInStackQueuedSpinLock( &g_ipoib.lock, &hdl );<o:p></o:p></P>
<P
class=MsoNormal>+
p_adapter->ipoib_state = p_adapter->ipoib_state &
~IPOIB_RESET_OR_DOWN;<o:p></o:p></P>
<P
class=MsoNormal>+
shutter_alive( &p_adapter->recv_shutter );<o:p></o:p></P>
<P
class=MsoNormal>+
KeReleaseInStackQueuedSpinLock( &hdl );<o:p></o:p></P>
<P
class=MsoNormal>
}<o:p></o:p></P>
<P
class=MsoNormal>
IPOIB_EXIT( IPOIB_DBG_INIT );<o:p></o:p></P>
<P
class=MsoNormal>
return status;<o:p></o:p></P>
<P class=MsoNormal>@@ -1074,19 +1109,15 @@<o:p></o:p></P>
<P
class=MsoNormal>
status = __ipoib_pnp_reg( p_adapter, IB_PNP_FLAG_REG_COMPLETE );<o:p></o:p></P>
<P
class=MsoNormal>
if( status != IB_SUCCESS )<o:p></o:p></P>
<P
class=MsoNormal>
{<o:p></o:p></P>
<P
class=MsoNormal>-
p_adapter->reset = FALSE;<o:p></o:p></P>
<P
class=MsoNormal>
IPOIB_PRINT( TRACE_LEVEL_ERROR, IPOIB_DBG_ERROR,<o:p></o:p></P>
<P
class=MsoNormal>
("__ipoib_pnp_reg returned %s\n",<o:p></o:p></P>
<P
class=MsoNormal>
p_adapter->p_ifc->get_err_str( status )) );<o:p></o:p></P>
<P
class=MsoNormal>-
NdisMResetComplete( <o:p></o:p></P>
<P
class=MsoNormal>-
p_adapter->h_adapter, NDIS_STATUS_HARD_ERRORS, TRUE );<o:p></o:p></P>
<P
class=MsoNormal>+
__ipoib_complete_reset( p_adapter, NDIS_STATUS_HARD_ERRORS );<o:p></o:p></P>
<P
class=MsoNormal>
}<o:p></o:p></P>
<P
class=MsoNormal>
}<o:p></o:p></P>
<P
class=MsoNormal>
else<o:p></o:p></P>
<P
class=MsoNormal>
{<o:p></o:p></P>
<P
class=MsoNormal>-
p_adapter->reset = FALSE;<o:p></o:p></P>
<P
class=MsoNormal>-
NdisMResetComplete(<o:p></o:p></P>
<P
class=MsoNormal>-
p_adapter->h_adapter, NDIS_STATUS_SUCCESS, TRUE );<o:p></o:p></P>
<P
class=MsoNormal>+
__ipoib_complete_reset( p_adapter, NDIS_STATUS_SUCCESS );<o:p></o:p></P>
<P
class=MsoNormal>
status = IB_SUCCESS;<o:p></o:p></P>
<P
class=MsoNormal>
}<o:p></o:p></P>
<P class=MsoNormal> <o:p></o:p></P>
<P class=MsoNormal>@@ -1261,10 +1292,7 @@<o:p></o:p></P>
<P class=MsoNormal> <o:p></o:p></P>
<P
class=MsoNormal>
if( p_adapter->reset )<o:p></o:p></P>
<P
class=MsoNormal>
{<o:p></o:p></P>
<P
class=MsoNormal>-
//ASSERT(FALSE);<o:p></o:p></P>
<P
class=MsoNormal>-
p_adapter->reset = FALSE;<o:p></o:p></P>
<P
class=MsoNormal>-
NdisMResetComplete(<o:p></o:p></P>
<P
class=MsoNormal>-
p_adapter->h_adapter, NDIS_STATUS_SUCCESS, TRUE );<o:p></o:p></P>
<P
class=MsoNormal>+
__ipoib_complete_reset( p_adapter, NDIS_STATUS_SUCCESS );<o:p></o:p></P>
<P
class=MsoNormal>
}<o:p></o:p></P>
<P class=MsoNormal> <o:p></o:p></P>
<P
class=MsoNormal>
IPOIB_EXIT( IPOIB_DBG_INIT );<o:p></o:p></P>
<P class=MsoNormal>@@ -1323,9 +1351,7 @@<o:p></o:p></P>
<P class=MsoNormal> <o:p></o:p></P>
<P
class=MsoNormal>
if( p_adapter->reset )<o:p></o:p></P>
<P
class=MsoNormal>
{<o:p></o:p></P>
<P
class=MsoNormal>-
p_adapter->reset = FALSE;<o:p></o:p></P>
<P
class=MsoNormal>-
NdisMResetComplete(<o:p></o:p></P>
<P
class=MsoNormal>-
p_adapter->h_adapter, NDIS_STATUS_SUCCESS, TRUE );<o:p></o:p></P>
<P
class=MsoNormal>+
__ipoib_complete_reset( p_adapter, NDIS_STATUS_SUCCESS );<o:p></o:p></P>
<P
class=MsoNormal>
}<o:p></o:p></P>
<P class=MsoNormal> <o:p></o:p></P>
<P
class=MsoNormal>
IPOIB_EXIT( IPOIB_DBG_INIT );<o:p></o:p></P>
<P class=MsoNormal>Index:
ulp/ipoib_NDIS6_CM/kernel/ipoib_adapter.h<o:p></o:p></P>
<P
class=MsoNormal>===================================================================<o:p></o:p></P>
<P class=MsoNormal>---
ulp/ipoib_NDIS6_CM/kernel/ipoib_adapter.h
(revision 2975)<o:p></o:p></P>
<P class=MsoNormal>+++
ulp/ipoib_NDIS6_CM/kernel/ipoib_adapter.h
(working copy)<o:p></o:p></P>
<P class=MsoNormal>@@ -70,14 +70,14 @@<o:p></o:p></P>
<P
class=MsoNormal>
CSUM_BYPASS<o:p></o:p></P>
<P class=MsoNormal> } csum_flag_t;<o:p></o:p></P>
<P class=MsoNormal> <o:p></o:p></P>
<P class=MsoNormal>-typedef enum _ipoib_state<o:p></o:p></P>
<P class=MsoNormal>-{<o:p></o:p></P>
<P
class=MsoNormal>-
IPOIB_INIT = -1,<o:p></o:p></P>
<P class=MsoNormal>- IPOIB_PAUSED,<o:p></o:p></P>
<P class=MsoNormal>- IPOIB_PAUSING,<o:p></o:p></P>
<P class=MsoNormal>- IPOIB_RUNNING<o:p></o:p></P>
<P class=MsoNormal>-} ipoib_state_t;<o:p></o:p></P>
<P class=MsoNormal>+typedef
uint32_t
ipoib_state_t;<o:p></o:p></P>
<P
class=MsoNormal>+#define
IPOIB_INIT
1<o:p></o:p></P>
<P class=MsoNormal>+#define
IPOIB_PAUSED
2<o:p></o:p></P>
<P
class=MsoNormal>+#define
IPOIB_PAUSING
4<o:p></o:p></P>
<P
class=MsoNormal>+#define
IPOIB_RUNNING
8<o:p></o:p></P>
<P
class=MsoNormal>+#define
IPOIB_RESET_OR_DOWN 16<o:p></o:p></P>
<P class=MsoNormal> <o:p></o:p></P>
<P class=MsoNormal>+<o:p></o:p></P>
<P class=MsoNormal> typedef struct _ipoib_offloads_cap_ {<o:p></o:p></P>
<P
class=MsoNormal>
boolean_t
lso;<o:p></o:p></P>
<P
class=MsoNormal>
boolean_t
send_chksum_offload;<o:p></o:p></P>
<P class=MsoNormal>Index:
ulp/ipoib_NDIS6_CM/kernel/ipoib_driver.cpp<o:p></o:p></P>
<P
class=MsoNormal>===================================================================<o:p></o:p></P>
<P class=MsoNormal>---
ulp/ipoib_NDIS6_CM/kernel/ipoib_driver.cpp
(revision 2975)<o:p></o:p></P>
<P class=MsoNormal>+++
ulp/ipoib_NDIS6_CM/kernel/ipoib_driver.cpp
(working copy)<o:p></o:p></P>
<P class=MsoNormal>@@ -3155,8 +3155,8 @@<o:p></o:p></P>
<P
class=MsoNormal>
p_adapter = (ipoib_adapter_t*)adapter_context;<o:p></o:p></P>
<P class=MsoNormal> <o:p></o:p></P>
<P
class=MsoNormal>
cl_obj_lock( &p_adapter->obj );<o:p></o:p></P>
<P
class=MsoNormal>-
if( p_adapter->ipoib_state == IPOIB_PAUSING ||<o:p></o:p></P>
<P
class=MsoNormal>-
p_adapter->ipoib_state == IPOIB_PAUSED)<o:p></o:p></P>
<P
class=MsoNormal>+
if( p_adapter->ipoib_state & IPOIB_PAUSING ||<o:p></o:p></P>
<P
class=MsoNormal>+
p_adapter->ipoib_state & IPOIB_PAUSED)<o:p></o:p></P>
<P
class=MsoNormal>
{<o:p></o:p></P>
<P
class=MsoNormal>
status = NDIS_STATUS_PAUSED; <o:p></o:p></P>
<P
class=MsoNormal>
IPOIB_PRINT( TRACE_LEVEL_ERROR, IPOIB_DBG_ERROR,<o:p></o:p></P>
<P class=MsoNormal>@@ -3275,6 +3275,8 @@<o:p></o:p></P>
<P
class=MsoNormal>
IN
NDIS_HANDLE
adapter_context,<o:p></o:p></P>
<P
class=MsoNormal>
IN NDIS_SHUTDOWN_ACTION shutdown_action)<o:p></o:p></P>
<P class=MsoNormal> {<o:p></o:p></P>
<P
class=MsoNormal>+
KLOCK_QUEUE_HANDLE
hdl;<o:p></o:p></P>
<P
class=MsoNormal>+
<o:p></o:p></P>
<P
class=MsoNormal>
IPOIB_ENTER( IPOIB_DBG_INIT ) ;<o:p></o:p></P>
<P
class=MsoNormal>
UNUSED_PARAM( shutdown_action );<o:p></o:p></P>
<P
class=MsoNormal>
<o:p></o:p></P>
<P class=MsoNormal>@@ -3287,7 +3289,16 @@<o:p></o:p></P>
<P
class=MsoNormal>
("Shutter shut, state = %d\n", p_adapter->ipoib_state));<o:p></o:p></P>
<P
class=MsoNormal>
IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_RECV,<o:p></o:p></P>
<P
class=MsoNormal>
("Shutter shut, state = %d\n", p_adapter->ipoib_state));<o:p></o:p></P>
<P
class=MsoNormal>-
shutter_shut ( &p_adapter->recv_shutter );<o:p></o:p></P>
<P
class=MsoNormal>+
// Wait until NDIS will return all indicated NBLs that were
received<o:p></o:p></P>
<P
class=MsoNormal>+
// Avoid shutting the shutter twice<o:p></o:p></P>
<P
class=MsoNormal>+
KeAcquireInStackQueuedSpinLock( &g_ipoib.lock, &hdl );<o:p></o:p></P>
<P
class=MsoNormal>+
ASSERT ( !(p_adapter->ipoib_state & IPOIB_RESET_OR_DOWN)
);<o:p></o:p></P>
<P
class=MsoNormal>+
if ( p_adapter->ipoib_state == IPOIB_RUNNING ) { //ensure that there was no
active reset<o:p></o:p></P>
<P
class=MsoNormal>+
shutter_shut( &p_adapter->recv_shutter );<o:p></o:p></P>
<P
class=MsoNormal>+
// Notify that shutter was already shut<o:p></o:p></P>
<P
class=MsoNormal>+
p_adapter->ipoib_state |= IPOIB_RESET_OR_DOWN;<o:p></o:p></P>
<P
class=MsoNormal>+
}<o:p></o:p></P>
<P
class=MsoNormal>+
KeReleaseInStackQueuedSpinLock( &hdl );<o:p></o:p></P>
<P
class=MsoNormal>
}<o:p></o:p></P>
<P class=MsoNormal> <o:p></o:p></P>
<P
class=MsoNormal>
IPOIB_EXIT( IPOIB_DBG_INIT );<o:p></o:p></P>
<P class=MsoNormal>@@ -3965,6 +3976,7 @@<o:p></o:p></P>
<P
class=MsoNormal>
cl_free( context );<o:p></o:p></P>
<P class=MsoNormal> }<o:p></o:p></P>
<P class=MsoNormal> <o:p></o:p></P>
<P class=MsoNormal>+<o:p></o:p></P>
<P class=MsoNormal> static NDIS_STATUS <o:p></o:p></P>
<P class=MsoNormal> ipoib_pause(<o:p></o:p></P>
<P
class=MsoNormal>
IN NDIS_HANDLE
adapter_context,
<o:p></o:p></P>
<P class=MsoNormal>@@ -3972,28 +3984,37 @@<o:p></o:p></P>
<P class=MsoNormal> {<o:p></o:p></P>
<P
class=MsoNormal>
ipoib_adapter_t
*p_adapter;<o:p></o:p></P>
<P
class=MsoNormal>
KLOCK_QUEUE_HANDLE
hdl;<o:p></o:p></P>
<P
class=MsoNormal>+
ipoib_state_t
prev_state;<o:p></o:p></P>
<P class=MsoNormal> <o:p></o:p></P>
<P
class=MsoNormal>-
UNREFERENCED_PARAMETER(pause_parameters);<o:p></o:p></P>
<P
class=MsoNormal>+
UNREFERENCED_PARAMETER( pause_parameters );<o:p></o:p></P>
<P
class=MsoNormal>
IPOIB_ENTER( IPOIB_DBG_INIT );<o:p></o:p></P>
<P class=MsoNormal> <o:p></o:p></P>
<P
class=MsoNormal>-
CL_ASSERT(adapter_context);<o:p></o:p></P>
<P
class=MsoNormal>+
CL_ASSERT( adapter_context );<o:p></o:p></P>
<P
class=MsoNormal>
p_adapter = (ipoib_adapter_t*)adapter_context;<o:p></o:p></P>
<P
class=MsoNormal>-
CL_ASSERT(p_adapter->ipoib_state == IPOIB_RUNNING);<o:p></o:p></P>
<P
class=MsoNormal>+
<o:p></o:p></P>
<P class=MsoNormal> <o:p></o:p></P>
<P
class=MsoNormal>
KeAcquireInStackQueuedSpinLock( &g_ipoib.lock, &hdl );<o:p></o:p></P>
<P
class=MsoNormal>+
prev_state = p_adapter->ipoib_state;<o:p></o:p></P>
<P
class=MsoNormal>+
CL_ASSERT ( prev_state & IPOIB_RUNNING );<o:p></o:p></P>
<P
class=MsoNormal>
p_adapter->ipoib_state = IPOIB_PAUSING;<o:p></o:p></P>
<P
class=MsoNormal>
KeReleaseInStackQueuedSpinLock( &hdl );<o:p></o:p></P>
<P
class=MsoNormal>
<o:p></o:p></P>
<P
class=MsoNormal>-
if (p_adapter->p_port) {<o:p></o:p></P>
<P
class=MsoNormal>+
if ( p_adapter->p_port ) {<o:p></o:p></P>
<P
class=MsoNormal>
cl_spinlock_acquire( &p_adapter->p_port->send_lock );<o:p></o:p></P>
<P
class=MsoNormal>-
ipoib_port_resume(p_adapter->p_port,FALSE);<o:p></o:p></P>
<P
class=MsoNormal>+
ipoib_port_resume( p_adapter->p_port,FALSE );<o:p></o:p></P>
<P
class=MsoNormal>
cl_spinlock_release( &p_adapter->p_port->send_lock );<o:p></o:p></P>
<P
class=MsoNormal>
}<o:p></o:p></P>
<P
class=MsoNormal>+
if ( prev_state == IPOIB_RUNNING ) { //i.e there was no active
reset<o:p></o:p></P>
<P
class=MsoNormal>+
IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_RECV,<o:p></o:p></P>
<P
class=MsoNormal>+
("Shutter shut, state = %d\n", p_adapter->ipoib_state) );<o:p></o:p></P>
<P
class=MsoNormal>+
shutter_shut ( &p_adapter->recv_shutter );<o:p></o:p></P>
<P
class=MsoNormal>+
}<o:p></o:p></P>
<P
class=MsoNormal>+
else {<o:p></o:p></P>
<P
class=MsoNormal>+
ASSERT ( prev_state & IPOIB_RESET_OR_DOWN);<o:p></o:p></P>
<P
class=MsoNormal>+
IPOIB_PRINT_EXIT( TRACE_LEVEL_ERROR, IPOIB_DBG_ERROR,<o:p></o:p></P>
<P
class=MsoNormal>+
("Got reset when IPoIB port wasn't active\n") );<o:p></o:p></P>
<P
class=MsoNormal>+
}<o:p></o:p></P>
<P
class=MsoNormal>
<o:p></o:p></P>
<P
class=MsoNormal>-
IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_RECV,<o:p></o:p></P>
<P
class=MsoNormal>-
("Shutter shut, state = %d\n", p_adapter->ipoib_state));<o:p></o:p></P>
<P
class=MsoNormal>-
shutter_shut ( &p_adapter->recv_shutter );<o:p></o:p></P>
<P
class=MsoNormal>-
<o:p></o:p></P>
<P
class=MsoNormal>
KeAcquireInStackQueuedSpinLock( &g_ipoib.lock, &hdl );<o:p></o:p></P>
<P
class=MsoNormal>
p_adapter->ipoib_state = IPOIB_PAUSED;<o:p></o:p></P>
<P
class=MsoNormal>
KeReleaseInStackQueuedSpinLock( &hdl );<o:p></o:p></P>
<P class=MsoNormal>@@ -4025,7 +4046,7 @@<o:p></o:p></P>
<P
class=MsoNormal>
// Check to see if we need to change any attributes<o:p></o:p></P>
<P
class=MsoNormal>
}<o:p></o:p></P>
<P
class=MsoNormal>
<o:p></o:p></P>
<P
class=MsoNormal>-
if ( (p_adapter->ipoib_state == IPOIB_PAUSED) || (p_adapter->ipoib_state
== IPOIB_INIT) ) {<o:p></o:p></P>
<P
class=MsoNormal>+
if ( (p_adapter->ipoib_state & IPOIB_PAUSED) ||
(p_adapter->ipoib_state & IPOIB_INIT) ) {<o:p></o:p></P>
<P
class=MsoNormal>
IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_RECV,<o:p></o:p></P>
<P
class=MsoNormal>
("Shutter Alive, ipoib_state = %d\n",
p_adapter->ipoib_state));<o:p></o:p></P>
<P
class=MsoNormal>
shutter_alive( &p_adapter->recv_shutter );<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal><B>Alexander (XaleX) Naslednikov<o:p></o:p></B></P>
<P class=MsoNormal><B>SW Networking Team<o:p></o:p></B></P>
<P class=MsoNormal><B>Mellanox Technologies<o:p></o:p></B></P>
<P class=MsoNormal><o:p> </o:p></P></DIV></BODY></HTML>