]> git.karo-electronics.de Git - linux-beck.git/commitdiff
bnx2i: Fix call trace while device reset
authorNilesh Javali <nilesh.javali@qlogic.com>
Tue, 19 May 2015 09:51:58 +0000 (05:51 -0400)
committerJames Bottomley <JBottomley@Odin.com>
Wed, 3 Jun 2015 00:15:24 +0000 (17:15 -0700)
The driver waits for command completion event while cleanup of task
within the frwd lock and back locks. The frwd lock was still held
which caused the call trace while issuing a device reset.
Release the frwd lock along with the back lock
to avoid waiting in the lock context.

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 1b8a9710e701158f9c14c24d33c7bcb6723834ca..72894378ffcf1c911a9b8ee9b55ee0cfc289a4e4 100644 (file)
@@ -1173,8 +1173,10 @@ static void bnx2i_cleanup_task(struct iscsi_task *task)
                bnx2i_send_cmd_cleanup_req(hba, task->dd_data);
 
                spin_unlock_bh(&conn->session->back_lock);
+               spin_unlock_bh(&conn->session->frwd_lock);
                wait_for_completion_timeout(&bnx2i_conn->cmd_cleanup_cmpl,
                                msecs_to_jiffies(ISCSI_CMD_CLEANUP_TIMEOUT));
+               spin_lock_bh(&conn->session->frwd_lock);
                spin_lock_bh(&conn->session->back_lock);
        }
        bnx2i_iscsi_unmap_sg_list(task->dd_data);