]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: lpfc: Abort outstanding ELS cmds when mailbox timeout error is detected
authorJustin Tee <justin.tee@broadcom.com>
Wed, 12 Jul 2023 18:05:18 +0000 (11:05 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Sep 2023 09:11:06 +0000 (11:11 +0200)
commitb2a019ec8b338683f66f5a339a010d8cb554c51c
treef50150443a38927719674090c08c640aa2458618
parentdfcd3c010209927b9f45b860f046635dc32e32e1
scsi: lpfc: Abort outstanding ELS cmds when mailbox timeout error is detected

[ Upstream commit 089ea22e374aa20043e72243c47b5867d5419d38 ]

A mailbox timeout error usually indicates something has gone wrong, and a
follow up reset of the HBA is a typical recovery mechanism.  Introduce a
MBX_TMO_ERR flag to detect such cases and have lpfc_els_flush_cmd abort ELS
commands if the MBX_TMO_ERR flag condition was set.  This ensures all of
the registered SGL resources meant for ELS traffic are not leaked after an
HBA reset.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://lore.kernel.org/r/20230712180522.112722-9-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.h
drivers/scsi/lpfc/lpfc_els.c
drivers/scsi/lpfc/lpfc_init.c
drivers/scsi/lpfc/lpfc_sli.c