summaryrefslogtreecommitdiff
path: root/drivers/scsi/bnx2fc/bnx2fc_tgt.c
diff options
context:
space:
mode:
authorBhanu Prakash Gollapudi <bprakash@broadcom.com>2012-04-24 22:26:02 (GMT)
committerJames Bottomley <JBottomley@Parallels.com>2012-05-22 09:00:06 (GMT)
commitc1bb4f33de87ad18ace1cf484ed0c78683d933a1 (patch)
treec141deace94fc5d923d19bb4e85bacf506bce215 /drivers/scsi/bnx2fc/bnx2fc_tgt.c
parentde9c05fafc296aa95b58352bad7f23f6199aa90d (diff)
downloadlinux-c1bb4f33de87ad18ace1cf484ed0c78683d933a1.tar.xz
[SCSI] bnx2fc: Decrememnt io ref count when abort times out
When IO abort times out during eh_abort or a flush operation is performed while abort is pending, the driver is not cleaning up the IO and thus not reducing the IO reference count. With this change, as part of explicit logout, the IO is cleaned up. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/bnx2fc/bnx2fc_tgt.c')
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_tgt.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_tgt.c b/drivers/scsi/bnx2fc/bnx2fc_tgt.c
index c1800b5..d3ee231 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_tgt.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_tgt.c
@@ -213,8 +213,17 @@ void bnx2fc_flush_active_ios(struct bnx2fc_rport *tgt)
BNX2FC_IO_DBG(io_req, "retire_queue flush\n");
- if (cancel_delayed_work(&io_req->timeout_work))
+ if (cancel_delayed_work(&io_req->timeout_work)) {
+ if (test_and_clear_bit(BNX2FC_FLAG_EH_ABORT,
+ &io_req->req_flags)) {
+ /* Handle eh_abort timeout */
+ BNX2FC_IO_DBG(io_req, "eh_abort for IO "
+ "in retire_q\n");
+ if (io_req->wait_for_comp)
+ complete(&io_req->tm_done);
+ }
kref_put(&io_req->refcount, bnx2fc_cmd_release);
+ }
clear_bit(BNX2FC_FLAG_ISSUE_RRQ, &io_req->req_flags);
}