diff options
author | Saurav Kashyap <skashyap@marvell.com> | 2020-03-27 08:48:48 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2020-03-30 01:10:59 +0300 |
commit | 30e73671a41658193a23cbba1d3038af4fbf5bc6 (patch) | |
tree | c4bd7efd37a684e3f9530a809c3f35e3b4803bd1 /drivers/scsi | |
parent | 77331115e220925af1f52e18ac99e37a0b0c10ad (diff) | |
download | linux-30e73671a41658193a23cbba1d3038af4fbf5bc6.tar.xz |
scsi: bnx2fc: Fix SCSI command completion after cleanup is posted
Driver received a SCSI completion after it posted the cleanup request. This
leads to a problem that one ref count wasn't released leading to
flush_active_ios to get struck. The callback from libfc never returned and
other ports were not processed leading to APD.
Decrease the refcnt as well as try to complete if something is waiting for
completion.
Link: https://lore.kernel.org/r/20200327054849.15947-3-skashyap@marvell.com
Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/bnx2fc/bnx2fc_io.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c index 9ab915240a2a..2b070f0835df 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; } |