]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 19:04:00 +0000 (20:04 +0100)
commit32a2d387822b41ef5ca415167c0d76d1a6df2b65
tree8363b07391eaa929f6a0093d3ff8a677e04079ad
parent78ef7c3909a5be9d3fcf03263e895ac11d6d93a5
scsi: lpfc: Check SLI_ACTIVE flag in FDMI cmpl before submitting follow up FDMI

[ Upstream commit 98f8d3588097e321be70f83b844fa67d4828fe5c ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/lpfc/lpfc_ct.c