]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
winverbs: allow WV:Disconnect() to be retried
authorSean Hefty <sean.hefty@intel.com>
Tue, 9 Mar 2010 01:53:21 +0000 (17:53 -0800)
committerSean Hefty <sean.hefty@intel.com>
Tue, 9 Mar 2010 01:53:21 +0000 (17:53 -0800)
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.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
trunk/core/winverbs/kernel/wv_ep.c

index e35e6e8d29802a36574fd5dfcd26a6b5d34c988f..f7394dc2455483d14de922de7e805ef136686307 100644 (file)
@@ -518,7 +518,7 @@ static NTSTATUS WvEpIbCmHandler(iba_cm_id *pId, iba_cm_event *pEvent)
                WdfObjectReleaseLock(ep->Queue);\r
                break;\r
        case iba_cm_dreq_error:\r
-               WvEpCompleteDisconnect(ep, STATUS_IO_TIMEOUT);\r
+               WvEpCompleteDisconnect(ep, STATUS_TIMEOUT);\r
                break;\r
        case iba_cm_rep_received:\r
                WdfObjectAcquireLock(ep->Queue);\r
@@ -1046,6 +1046,7 @@ void WvEpDisconnect(WV_PROVIDER *pProvider, WDFREQUEST Request)
                        }\r
                }\r
                /* Fall through to passive disconnect case on failure */\r
+       case WvEpActiveDisconnect:\r
        case WvEpPassiveDisconnect:\r
                ep->State = WvEpDisconnected;\r
                WdfObjectReleaseLock(ep->Queue);\r