]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[SCSI] bnx2i: Recouple the CFC delete cleanup with cm_abort/close completion
authorEddie Wai <eddie.wai@broadcom.com>
Thu, 12 Aug 2010 23:44:29 +0000 (16:44 -0700)
committerJames Bottomley <James.Bottomley@suse.de>
Sun, 5 Sep 2010 17:50:08 +0000 (14:50 -0300)
Specific to the Broadcom 10g chipset, the CFC delete operation must be
coupled with the cm_abort/close with does the SRC delete/terminate offload
operation prior.

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Acked-by: Benjamin Li <benli@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 36b245b0dd3c60512e5d9dc8f7de70eb429048f8..0425540d4814d2accb6507ada0a2587be4028047 100644 (file)
@@ -1996,11 +1996,13 @@ int bnx2i_hw_ep_disconnect(struct bnx2i_endpoint *bnx2i_ep)
        else
                close_ret = cnic->cm_abort(bnx2i_ep->cm_sk);
 
+       /* No longer allow CFC delete if cm_close/abort fails the request */
        if (close_ret)
-               bnx2i_ep->state = EP_STATE_DISCONN_COMPL;
-
-       /* wait for option-2 conn teardown */
-       wait_event_interruptible(bnx2i_ep->ofld_wait,
+               printk(KERN_ALERT "bnx2i: %s close/abort(%d) returned %d\n",
+                       bnx2i_ep->hba->netdev->name, close, close_ret);
+       else
+               /* wait for option-2 conn teardown */
+               wait_event_interruptible(bnx2i_ep->ofld_wait,
                                 bnx2i_ep->state != EP_STATE_DISCONN_START);
 
        if (signal_pending(current))