diff options
author | Justin Tee <justin.tee@broadcom.com> | 2023-10-31 20:12:20 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2023-11-15 15:52:58 +0100 |
commit | 57ea41eb7fe6d6a6bf80f40de9acddb33b41eeb9 (patch) | |
tree | 6329c9def5536c8f42fea822dde79fb3f9c28591 /drivers/scsi/lpfc/lpfc_sli.c | |
parent | scsi: lpfc: Eliminate unnecessary relocking in lpfc_check_nlp_post_devloss() (diff) | |
download | linux-57ea41eb7fe6d6a6bf80f40de9acddb33b41eeb9.tar.xz linux-57ea41eb7fe6d6a6bf80f40de9acddb33b41eeb9.zip |
scsi: lpfc: Return early in lpfc_poll_eratt() when the driver is unloading
Add a check in lpfc_poll_eratt() when the driver is unloading. There is no
point to check for error attention events if the driver is rmmod'ed.
If the driver is reloaded, as part of insmod initialization, then a fresh
reset is always asserted to start clean and free of error attention events.
Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://lore.kernel.org/r/20231031191224.150862-6-justintee8345@gmail.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_sli.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_sli.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index 9386e7b44750..2cb327efd57d 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -3938,6 +3938,9 @@ void lpfc_poll_eratt(struct timer_list *t) if (!(phba->hba_flag & HBA_SETUP)) return; + if (phba->pport->load_flag & FC_UNLOADING) + return; + /* Here we will also keep track of interrupts per sec of the hba */ sli_intr = phba->sli.slistat.sli_intr; |