[ofw] [WOF2-2] [PATCH v2 4/4] winverbs: allow WV:Disconnect() to be retried

Sean Hefty sean.hefty at intel.com
Tue Mar 9 14:54:37 PST 2010


ND for some odd reason wants a successful return code for
a failed disconnect call.  If a Disconnect() call fails,
allow it to be retried.  Return STATUS_TIMEOUT - a 'successful'
failure, rather than STATUS_IO_TIMEOUT, which is a 'failed' failure.
(I love Windows, really, I do.)  A subsequent call to EP:
Disconnect() after a timeout will force the QP into the error
state and force the EP into the disconnected state.

This change is needed to prevent ndping and other ND tests from
reporting a failure.  They only allow disconnect calls to fail
'successfully' with STATUS_TIMEOUT.  With the status mapping
removed from the user space WV ND library, we need to return the
desired value directly from the kernel.

Signed-off-by: Sean Hefty <sean.hefty at intel.com>
---
 trunk/core/winverbs/kernel/wv_ep.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/trunk/core/winverbs/kernel/wv_ep.c b/trunk/core/winverbs/kernel/wv_ep.c
index e35e6e8..f7394dc 100644
--- a/trunk/core/winverbs/kernel/wv_ep.c
+++ b/trunk/core/winverbs/kernel/wv_ep.c
@@ -518,7 +518,7 @@ static NTSTATUS WvEpIbCmHandler(iba_cm_id *pId, iba_cm_event *pEvent)
 		WdfObjectReleaseLock(ep->Queue);
 		break;
 	case iba_cm_dreq_error:
-		WvEpCompleteDisconnect(ep, STATUS_IO_TIMEOUT);
+		WvEpCompleteDisconnect(ep, STATUS_TIMEOUT);
 		break;
 	case iba_cm_rep_received:
 		WdfObjectAcquireLock(ep->Queue);
@@ -1046,6 +1046,7 @@ void WvEpDisconnect(WV_PROVIDER *pProvider, WDFREQUEST Request)
 			}
 		}
 		/* Fall through to passive disconnect case on failure */
+	case WvEpActiveDisconnect:
 	case WvEpPassiveDisconnect:
 		ep->State = WvEpDisconnected;
 		WdfObjectReleaseLock(ep->Queue);





More information about the ofw mailing list