scsi: hisi_sas: Clear HISI_SAS_HW_FAULT_BIT earlier
authorJohn Garry <john.garry@huawei.com>
Mon, 5 Sep 2022 11:48:46 +0000 (19:48 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 7 Sep 2022 02:28:10 +0000 (22:28 -0400)
Once the controller HW has been reset then we can unset flag
HISI_SAS_HW_FAULT_BIT. In clearing this flag earlier we can now
successfully execute commands in hisi_sas_controller_reset_done(), like
bcast processing.

Link: https://lore.kernel.org/r/1662378529-101489-3-git-send-email-john.garry@huawei.com
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hisi_sas/hisi_sas_main.c

index 33af5b8dede206725e278263ef0913d80541c6e7..a33d46a5d7cd9b6347f1aa943048916b2f5fc40d 100644 (file)
@@ -1527,9 +1527,9 @@ static int hisi_sas_controller_reset(struct hisi_hba *hisi_hba)
                clear_bit(HISI_SAS_RESETTING_BIT, &hisi_hba->flags);
                return rc;
        }
+       clear_bit(HISI_SAS_HW_FAULT_BIT, &hisi_hba->flags);
 
        hisi_sas_controller_reset_done(hisi_hba);
-       clear_bit(HISI_SAS_HW_FAULT_BIT, &hisi_hba->flags);
        dev_info(dev, "controller reset complete\n");
 
        return 0;