Re: [PATCH v20 1/2] scsi: ufs: Enable power management for wlun

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/19/2021 11:37 AM, Adrian Hunter wrote:
On 16/04/21 10:49 pm, Asutosh Das wrote:

Co-developed-by: Can Guo <cang@xxxxxxxxxxxxxx>
Signed-off-by: Can Guo <cang@xxxxxxxxxxxxxx>
Signed-off-by: Asutosh Das <asutoshd@xxxxxxxxxxxxxx>
---

I came across 3 issues while testing.  See comments below.

Hi Adrian
Thanks for the comments.
<SNIP>

@@ -5794,7 +5839,7 @@ static void ufshcd_err_handling_unprepare(struct ufs_hba *hba)
  	if (ufshcd_is_clkscaling_supported(hba))
  		ufshcd_clk_scaling_suspend(hba, false);
  	ufshcd_clear_ua_wluns(hba);

ufshcd_clear_ua_wluns() deadlocks trying to clear UFS_UPIU_RPMB_WLUN
if sdev_rpmb is suspended and sdev_ufs_device is suspending.
e.g. ufshcd_wl_suspend() is waiting on host_sem while ufshcd_err_handler()
is running, at which point sdev_rpmb has already suspended.

Umm, I didn't understand this deadlock.
When you say, sdev_rpmb is suspended, does it mean runtime_suspended?
sdev_ufs_device is suspending - this can't be runtime_suspending, while ufshcd_err_handling_unprepare is running.

If you've a call-stack of this deadlock, please can you share it with me. I'll also try to reproduce this.

I'll address the other comments in the next version.


Thank you!

-	pm_runtime_put(hba->dev);
+	ufshcd_rpm_put(hba);
  }

<SNIP>

+void ufshcd_resume_complete(struct device *dev)
+{

--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
Linux Foundation Collaborative Project



[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux for Synopsys ARC Processors]    
  • [Linux on Unisoc (RDA Micro) SoCs]     [Linux Actions SoC]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  •   Powered by Linux