Skip to content

Commit d305c25

Browse files
jsmart-ghmartinkpetersen
authored andcommitted
scsi: lpfc: Wait for successful restart of SLI3 adapter during host sg_reset
A prior patch introduced HBA_NEEDS_CFG_PORT flag logic, but in lpfc_sli_brdrestart_s3() code path, right after HBA_NEEDS_CFG_PORT is set, the phba->hba_flag is cleared in lpfc_sli_brdreset(). Fix by calling lpfc_sli_chipset_init() to wait for successful restart of the HBA in lpfc_host_reset_handler() after lpfc_sli_brdrestart(). lpfc_sli_chipset_init() sets the HBA_NEEDS_CFG_PORT flag so that the lpfc_sli_hba_setup() routine from lpfc_online() will execute lpfc_sli_config_port() initialization step when the brdrestart is successful. Link: https://lore.kernel.org/r/[email protected] Fixes: d2f2547 ("scsi: lpfc: Fix auto sli_mode and its effect on CONFIG_PORT for SLI3") Co-developed-by: Justin Tee <[email protected]> Signed-off-by: Justin Tee <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent a516074 commit d305c25

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/scsi/lpfc/lpfc_scsi.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6648,6 +6648,13 @@ lpfc_host_reset_handler(struct scsi_cmnd *cmnd)
66486648
if (rc)
66496649
goto error;
66506650

6651+
/* Wait for successful restart of adapter */
6652+
if (phba->sli_rev < LPFC_SLI_REV4) {
6653+
rc = lpfc_sli_chipset_init(phba);
6654+
if (rc)
6655+
goto error;
6656+
}
6657+
66516658
rc = lpfc_online(phba);
66526659
if (rc)
66536660
goto error;

0 commit comments

Comments
 (0)