Skip to content

Commit 30e7367

Browse files
Saurav Kashyapmartinkpetersen
authored andcommitted
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/[email protected] Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 7733111 commit 30e7367

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/scsi/bnx2fc/bnx2fc_io.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1917,6 +1917,12 @@ void bnx2fc_process_scsi_cmd_compl(struct bnx2fc_cmd *io_req,
19171917
/* we will not receive ABTS response for this IO */
19181918
BNX2FC_IO_DBG(io_req, "Timer context finished processing "
19191919
"this scsi cmd\n");
1920+
if (test_and_clear_bit(BNX2FC_FLAG_IO_CLEANUP,
1921+
&io_req->req_flags)) {
1922+
BNX2FC_IO_DBG(io_req,
1923+
"Actual completion after cleanup request cleaning up\n");
1924+
bnx2fc_process_cleanup_compl(io_req, task, num_rq);
1925+
}
19201926
return;
19211927
}
19221928

0 commit comments

Comments
 (0)