scsi: lpfc: Move clearing of HBA_SETUP flag to before lpfc_sli4_queue_unset
authorJustin Tee <justin.tee@broadcom.com>
Wed, 18 Jun 2025 19:21:34 +0000 (12:21 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 23 Jun 2025 17:10:34 +0000 (13:10 -0400)
commita28d10a15600e3eae19035774cabad06008a8a59
tree5824fa40b8411b579a725bff4f88b05c525dfd8d
parent1cced5779e7a3ff7ec025fc47c76a7bd3bb38877
scsi: lpfc: Move clearing of HBA_SETUP flag to before lpfc_sli4_queue_unset

Move clearing of HBA_SETUP flag out of lpfc_sli_brdrestart_s4 and before
lpfc_sli4_queue_unset.  lpfc_sli4_queue_unset kfrees phba queues, so
clear the HBA_SETUP atomic flag to signal that the phba struct is no
longer initialized.

Also, add a check for the HBA_SETUP flag in the lpfc_sli4_io_xri_aborted
routine before dereferencing the ELS WQ.

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