bnx2i: Fixed firmware assert, during target logout.
authorTej Parkash <tej.parkash@qlogic.com>
Tue, 19 May 2015 09:51:57 +0000 (05:51 -0400)
committerJames Bottomley <JBottomley@Odin.com>
Wed, 3 Jun 2015 00:14:56 +0000 (17:14 -0700)
Fix the firmware assert, during target logout in
case driver received FIN from target before waiting for
asyncronous response.

Signed-off-by: Tej Parkash <tej.parkash@qlogic.com>
Signed-off-by: Nilesh Javali <nilesh.javali@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
drivers/scsi/bnx2i/bnx2i_iscsi.c

index e53078d033099ce8a3942e1151e9b9044fea0c8d..1b8a9710e701158f9c14c24d33c7bcb6723834ca 100644 (file)
@@ -2093,7 +2093,8 @@ int bnx2i_hw_ep_disconnect(struct bnx2i_endpoint *bnx2i_ep)
        else
                /* wait for option-2 conn teardown */
                wait_event_interruptible(bnx2i_ep->ofld_wait,
-                                bnx2i_ep->state != EP_STATE_DISCONN_START);
+                               ((bnx2i_ep->state != EP_STATE_DISCONN_START)
+                               && (bnx2i_ep->state != EP_STATE_TCP_FIN_RCVD)));
 
        if (signal_pending(current))
                flush_signals(current);