Re: [PATCH v1] ufs: core: bypass get rpm when err handling with pm_op_in_progress

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

 



On 9/15/22 04:58, peter.wang@xxxxxxxxxxxx wrote:
-static void ufshcd_err_handling_prepare(struct ufs_hba *hba)
+static void ufshcd_err_handling_prepare(struct ufs_hba *hba, bool *rpm_put)
  {
-	ufshcd_rpm_get_sync(hba);
+	if (!hba->pm_op_in_progress) {
+		ufshcd_rpm_get_sync(hba);
+		*rpm_put = true;
+	}
+

Hi Peter,

I don't think that this patch is sufficient. If ufshcd_err_handling_prepare() is called by the host reset handler (ufshcd_eh_host_reset_handler()) then the host state will be SHOST_RECOVERY. In that state SCSI command submission will hang and hence any ufshcd_rpm_get_sync() call will hang.

How about removing the ufshcd_rpm_get_sync() call from ufshcd_err_handling_prepare() and the ufshcd_rpm_put() call from ufshcd_err_handling_unprepare()? It is guaranteed that no commands are in progress for a runtime suspended LUN so the code for aborting pending requests in the UFS error handler will be skipped anyway if it is invoked for a runtime suspended device.

Thanks,

Bart.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux