]> www.infradead.org Git - users/jedix/linux-maple.git/commit
scsi: lpfc: Check SLI_ACTIVE flag in FDMI cmpl before submitting follow up FDMI
authorJustin Tee <justin.tee@broadcom.com>
Thu, 31 Oct 2024 22:32:13 +0000 (15:32 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sun, 3 Nov 2024 01:45:24 +0000 (21:45 -0400)
commit98f8d3588097e321be70f83b844fa67d4828fe5c
tree4805e19135b18c7b3ffd8b91adb2f1398275e3fc
parent940ddac8961209a37fec13c1f8967ce93f31d2c0
scsi: lpfc: Check SLI_ACTIVE flag in FDMI cmpl before submitting follow up FDMI

The lpfc_cmpl_ct_disc_fdmi() routine has incorrect logic that treats an
FDMI completion with error LOCAL_REJECT/SLI_ABORTED as a success status.
Under the erroneous assumption of successful completion, the routine
proceeds to issue follow up FDMI commands, which may never complete if
the HBA is in an errata state as indicated by the errored completion
status.  Fix by freeing FDMI cmd resources and early return when the
LPFC_SLI_ACTIVE flag is not set and a LOCAL_REJECT/SLI_ABORTED or
SLI_DOWN status is received.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://lore.kernel.org/r/20241031223219.152342-6-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_ct.c