mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 06:18:45 -04:00
scsi: lpfc: Restart eratt_poll timer if HBA_SETUP flag still unset
Reschedule the eratt_poll timer if the HBA_SETUP flag isn’t set yet. The eratt_poll timer should only be cancelled if FC_UNLOADING flag is set or if lpfc_stop_hba_timers() is called as part of error, reset, or offline handling. Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20250425194806.3585-4-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
committed by
Martin K. Petersen
parent
8808c36b48
commit
19d768dca5
@@ -3926,12 +3926,19 @@ void lpfc_poll_eratt(struct timer_list *t)
|
||||
uint64_t sli_intr, cnt;
|
||||
|
||||
phba = from_timer(phba, t, eratt_poll);
|
||||
if (!test_bit(HBA_SETUP, &phba->hba_flag))
|
||||
return;
|
||||
|
||||
if (test_bit(FC_UNLOADING, &phba->pport->load_flag))
|
||||
return;
|
||||
|
||||
if (phba->sli_rev == LPFC_SLI_REV4 &&
|
||||
!test_bit(HBA_SETUP, &phba->hba_flag)) {
|
||||
lpfc_printf_log(phba, KERN_INFO, LOG_SLI,
|
||||
"0663 HBA still initializing 0x%lx, restart "
|
||||
"timer\n",
|
||||
phba->hba_flag);
|
||||
goto restart_timer;
|
||||
}
|
||||
|
||||
/* Here we will also keep track of interrupts per sec of the hba */
|
||||
sli_intr = phba->sli.slistat.sli_intr;
|
||||
|
||||
@@ -3950,13 +3957,16 @@ void lpfc_poll_eratt(struct timer_list *t)
|
||||
/* Check chip HA register for error event */
|
||||
eratt = lpfc_sli_check_eratt(phba);
|
||||
|
||||
if (eratt)
|
||||
if (eratt) {
|
||||
/* Tell the worker thread there is work to do */
|
||||
lpfc_worker_wake_up(phba);
|
||||
else
|
||||
/* Restart the timer for next eratt poll */
|
||||
mod_timer(&phba->eratt_poll,
|
||||
jiffies + secs_to_jiffies(phba->eratt_poll_interval));
|
||||
return;
|
||||
}
|
||||
|
||||
restart_timer:
|
||||
/* Restart the timer for next eratt poll */
|
||||
mod_timer(&phba->eratt_poll,
|
||||
jiffies + secs_to_jiffies(phba->eratt_poll_interval));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user