summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bnx2fc/bnx2fc_tgt.c
diff options
context:
space:
mode:
authorBhanu Prakash Gollapudi <bprakash@broadcom.com>2012-04-25 00:26:03 +0200
committerJames Bottomley <JBottomley@Parallels.com>2012-05-22 11:01:26 +0200
commit92886c9c97fd20dde26a12cd9f43cd3c786bc8ea (patch)
treef596efc0039eb8db32baa03d9a3f9a2ac09f7dda /drivers/scsi/bnx2fc/bnx2fc_tgt.c
parent[SCSI] bnx2fc: Decrememnt io ref count when abort times out (diff)
downloadlinux-92886c9c97fd20dde26a12cd9f43cd3c786bc8ea.tar.xz
linux-92886c9c97fd20dde26a12cd9f43cd3c786bc8ea.zip
[SCSI] bnx2fc: cleanup task management IO when it times out.
When the task management IO times out, or a flush operation is performed while task management IO is pending, driver is not cleaning up the IO. This patch cleans up the IO for the above cases. 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.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_tgt.c b/drivers/scsi/bnx2fc/bnx2fc_tgt.c
index d3ee231a5680..082a25c3117e 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_tgt.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_tgt.c
@@ -185,6 +185,16 @@ void bnx2fc_flush_active_ios(struct bnx2fc_rport *tgt)
BUG_ON(rc);
}
+ list_for_each_safe(list, tmp, &tgt->active_tm_queue) {
+ i++;
+ io_req = (struct bnx2fc_cmd *)list;
+ list_del_init(&io_req->link);
+ io_req->on_tmf_queue = 0;
+ BNX2FC_IO_DBG(io_req, "tm_queue cleanup\n");
+ if (io_req->wait_for_comp)
+ complete(&io_req->tm_done);
+ }
+
list_for_each_safe(list, tmp, &tgt->els_queue) {
i++;
io_req = (struct bnx2fc_cmd *)list;