Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4b6fb531 authored by Can Guo's avatar Can Guo
Browse files

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: default avatarCan Guo <cang@codeaurora.org>
parent 5c3481e0
Loading
Loading
Loading
Loading
+11 −8
Original line number Diff line number Diff line
@@ -2778,6 +2778,8 @@ 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);

	if (in_task()) {
		usleep_range(1000, 1100);
		ufs_qcom_testbus_read(hba);
		usleep_range(1000, 1100);
@@ -2787,6 +2789,7 @@ static void ufs_qcom_dump_dbg_regs(struct ufs_hba *hba)
		usleep_range(1000, 1100);
		ufs_qcom_phy_dbg_register_dump(phy);
	}
}

/*
 * ufs_qcom_parse_limits - read limits from DTS