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)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sun, 23 Jul 2023 20:17:07 +0000 (16:17 -0400)
commit089ea22e374aa20043e72243c47b5867d5419d38
tree6a274539446306a73dedba8dd5d7c4de0564d8b3
parent9388da30376670613d7b8031e6d62b0b6ce08228
scsi: lpfc: Abort outstanding ELS cmds when mailbox timeout error is detected

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>
drivers/scsi/lpfc/lpfc.h
drivers/scsi/lpfc/lpfc_els.c
drivers/scsi/lpfc/lpfc_init.c
drivers/scsi/lpfc/lpfc_sli.c