[PATCH 2/3] bnx2fc: Fix scsi command completion after cleanup is posted.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Driver received a scsi completion after it posted the cleanup
request. This leads to a problem that one of the ref count wasn't
released leading to flush_active_ios to struck. The callback from
libfc never returned and other ports were not processed leading to
APD.

- The patch will decrease the refcnt as well try to complete if
something is waiting for completion.

Signed-off-by: Saurav Kashyap <skashyap@xxxxxxxxxxx>
---
 drivers/scsi/bnx2fc/bnx2fc_io.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c
index 9ab9152..2b070f0 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_io.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_io.c
@@ -1917,6 +1917,12 @@ void bnx2fc_process_scsi_cmd_compl(struct bnx2fc_cmd *io_req,
 		/* we will not receive ABTS response for this IO */
 		BNX2FC_IO_DBG(io_req, "Timer context finished processing "
 			   "this scsi cmd\n");
+		if (test_and_clear_bit(BNX2FC_FLAG_IO_CLEANUP,
+				       &io_req->req_flags)) {
+			BNX2FC_IO_DBG(io_req,
+				      "Actual completion after cleanup request cleaning up\n");
+			bnx2fc_process_cleanup_compl(io_req, task, num_rq);
+		}
 		return;
 	}
 
-- 
1.8.3.1




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux