scsi: ufs-qcom: Dump bus test and PHY registers only if sleep is allowed

Dumping bus test and PHY registers needs to sleep a bit intermittently as
there are too many of them. Skip them if it is called from contexts where
sleep is not allowed.

Change-Id: Ia6b77a66095b72749e2ee85a2d97fb9608867a0b
Signed-off-by: Can Guo <cang@codeaurora.org>
This commit is contained in:
Can Guo 2020-06-03 13:10:50 +08:00
commit 4b6fb5312e

View file

@ -2778,14 +2778,17 @@ static void ufs_qcom_dump_dbg_regs(struct ufs_hba *hba)
/* sleep a bit intermittently as we are dumping too much data */
ufs_qcom_print_hw_debug_reg_all(hba, NULL, ufs_qcom_dump_regs_wrapper);
usleep_range(1000, 1100);
ufs_qcom_testbus_read(hba);
usleep_range(1000, 1100);
ufs_qcom_print_unipro_testbus(hba);
usleep_range(1000, 1100);
ufs_qcom_print_utp_hci_testbus(hba);
usleep_range(1000, 1100);
ufs_qcom_phy_dbg_register_dump(phy);
if (in_task()) {
usleep_range(1000, 1100);
ufs_qcom_testbus_read(hba);
usleep_range(1000, 1100);
ufs_qcom_print_unipro_testbus(hba);
usleep_range(1000, 1100);
ufs_qcom_print_utp_hci_testbus(hba);
usleep_range(1000, 1100);
ufs_qcom_phy_dbg_register_dump(phy);
}
}
/*