Commit a6de9a2f authored by James Smart's avatar James Smart Committed by Martin K. Petersen

scsi: lpfc: Fix diagnostic fw logging after a function reset

The lpfc_sli4_ras_setup() routine is only called from the
lpfc_pci_probe_one_s4() routine, which means diagnostic fw logging
initialization only occurs during probing.

Thus, any path involving a reset of the HBA that restarts the state of the
SLI port does not reinitialize diagnostic fw logging.

Move lpfc_sli4_ras_setup() into lpfc_sli4_hba_setup() so that the
LOWLEVEL_SET_DIAG_LOG_OPTIONS mailbox command can be sent after a function
reset.

Link: https://lore.kernel.org/r/20220412222008.126521-4-jsmart2021@gmail.comCo-developed-by: default avatarJustin Tee <justin.tee@broadcom.com>
Signed-off-by: default avatarJustin Tee <justin.tee@broadcom.com>
Signed-off-by: default avatarJames Smart <jsmart2021@gmail.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent e294647b
...@@ -14832,9 +14832,6 @@ lpfc_pci_probe_one_s4(struct pci_dev *pdev, const struct pci_device_id *pid) ...@@ -14832,9 +14832,6 @@ lpfc_pci_probe_one_s4(struct pci_dev *pdev, const struct pci_device_id *pid)
/* Check if there are static vports to be created. */ /* Check if there are static vports to be created. */
lpfc_create_static_vport(phba); lpfc_create_static_vport(phba);
/* Enable RAS FW log support */
lpfc_sli4_ras_setup(phba);
timer_setup(&phba->cpuhp_poll_timer, lpfc_sli4_poll_hbtimer, 0); timer_setup(&phba->cpuhp_poll_timer, lpfc_sli4_poll_hbtimer, 0);
cpuhp_state_add_instance_nocalls(lpfc_cpuhp_state, &phba->cpuhp); cpuhp_state_add_instance_nocalls(lpfc_cpuhp_state, &phba->cpuhp);
......
...@@ -8864,6 +8864,9 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba) ...@@ -8864,6 +8864,9 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba)
} }
mempool_free(mboxq, phba->mbox_mem_pool); mempool_free(mboxq, phba->mbox_mem_pool);
/* Enable RAS FW log support */
lpfc_sli4_ras_setup(phba);
phba->hba_flag |= HBA_SETUP; phba->hba_flag |= HBA_SETUP;
return rc; return rc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment