]> Git Repo - linux.git/commitdiff
scsi: hisi_sas: Recover PHY state according to the status before reset
authorXiang Chen <[email protected]>
Fri, 2 Oct 2020 14:30:38 +0000 (22:30 +0800)
committerMartin K. Petersen <[email protected]>
Wed, 7 Oct 2020 00:47:06 +0000 (20:47 -0400)
Currently the PHY state is set according to the state of the PHYs after
reset. This is invalid as the PHYs are already re-initialized.

Set PHY state according to the state before the reset instead of after.

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Xiang Chen <[email protected]>
Signed-off-by: John Garry <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
drivers/scsi/hisi_sas/hisi_sas_main.c

index ef3922ad70c0c286875ce95fca8ef4b6eaffe3f7..5b7357a5620dd8f549a6ff23361c07b6ebb507d3 100644 (file)
@@ -1551,7 +1551,6 @@ EXPORT_SYMBOL_GPL(hisi_sas_controller_reset_prepare);
 void hisi_sas_controller_reset_done(struct hisi_hba *hisi_hba)
 {
        struct Scsi_Host *shost = hisi_hba->shost;
-       u32 state;
 
        /* Init and wait for PHYs to come up and all libsas event finished. */
        hisi_hba->hw->phys_init(hisi_hba);
@@ -1566,8 +1565,7 @@ void hisi_sas_controller_reset_done(struct hisi_hba *hisi_hba)
        scsi_unblock_requests(shost);
        clear_bit(HISI_SAS_RESET_BIT, &hisi_hba->flags);
 
-       state = hisi_hba->hw->get_phys_state(hisi_hba);
-       hisi_sas_rescan_topology(hisi_hba, state);
+       hisi_sas_rescan_topology(hisi_hba, hisi_hba->phy_state);
 }
 EXPORT_SYMBOL_GPL(hisi_sas_controller_reset_done);
 
This page took 0.056792 seconds and 4 git commands to generate.