[SCSI] bnx2i: Allow to abort the connection if connect request times out
authorEddie Wai <eddie.wai@broadcom.com>
Tue, 23 Nov 2010 23:29:25 +0000 (15:29 -0800)
committerJames Bottomley <James.Bottomley@suse.de>
Tue, 21 Dec 2010 18:24:12 +0000 (12:24 -0600)
In the situation where the connect completion response arrives after
the connect request has already timed out, the connection was not being
aborted but only the resource was being freed.  This creates a problem
for 5771X (10g) as the chip flags this with an assertion.

This change will properly aborts the connection before freeing the
resource.

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/bnx2i/bnx2i_iscsi.c

index 4882b00b3539b307ca2205d0078513b67c426ae0..a2c9b1f2ea5cb052adb8a91195ba1971b977d58a 100644 (file)
@@ -1906,13 +1906,13 @@ static int bnx2i_ep_tcp_conn_active(struct bnx2i_endpoint *bnx2i_ep)
                cnic_dev_10g = 1;
 
        switch (bnx2i_ep->state) {
-       case EP_STATE_CONNECT_START:
        case EP_STATE_CONNECT_FAILED:
        case EP_STATE_CLEANUP_FAILED:
        case EP_STATE_OFLD_FAILED:
        case EP_STATE_DISCONN_TIMEDOUT:
                ret = 0;
                break;
+       case EP_STATE_CONNECT_START:
        case EP_STATE_CONNECT_COMPL:
        case EP_STATE_ULP_UPDATE_START:
        case EP_STATE_ULP_UPDATE_COMPL: