scsi: bnx2fc: Fix SCSI command completion after cleanup is posted
authorSaurav Kashyap <skashyap@marvell.com>
Fri, 27 Mar 2020 05:48:48 +0000 (22:48 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sun, 29 Mar 2020 22:10:59 +0000 (18:10 -0400)
commit30e73671a41658193a23cbba1d3038af4fbf5bc6
treec4bd7efd37a684e3f9530a809c3f35e3b4803bd1
parent77331115e220925af1f52e18ac99e37a0b0c10ad
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>
drivers/scsi/bnx2fc/bnx2fc_io.c