Skip to content

Commit 21f04fb

Browse files
Nitin Rawatmartinkpetersen
authored andcommitted
scsi: ufs: ufs-qcom: Check host controller state
Commit 52a5180 ("scsi: ufs: core: Fix missing clk change notification on host reset") added UFS clock scaling notification to ufshcd_host_reset_and_restore(). This invokes hibern8 enter and exit on Qualcomm platform which fails because controller is in reset state. Fix this by checking the Host controller state before sending hibern8 command. __ufshcd_wl_resume() ufshcd_reset_and_restore() ufshcd_host_reset_and_restore() ufshcd_scale_clks() ufshcd_vops_clk_scale_notify() ufs_qcom_clk_scale_notify() ufshcd_uic_hibern8_enter() Fixes: 52a5180 ("scsi: ufs: core: Fix missing clk change notification on host reset") Co-developed-by: Manish Pandey <[email protected]> Signed-off-by: Manish Pandey <[email protected]> Signed-off-by: Nitin Rawat <[email protected]> Link: https://lore.kernel.org/r/[email protected] Acked-by: Manivannan Sadhasivam <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 548fdf7 commit 21f04fb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/ufs/host/ufs-qcom.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1382,6 +1382,10 @@ static int ufs_qcom_clk_scale_notify(struct ufs_hba *hba,
13821382
struct ufs_pa_layer_attr *dev_req_params = &host->dev_req_params;
13831383
int err = 0;
13841384

1385+
/* check the host controller state before sending hibern8 cmd */
1386+
if (!ufshcd_is_hba_active(hba))
1387+
return 0;
1388+
13851389
if (status == PRE_CHANGE) {
13861390
err = ufshcd_uic_hibern8_enter(hba);
13871391
if (err)

0 commit comments

Comments
 (0)