Re: [PATCH v1] scsi: ufs: correct ufshcd_shutdown flow

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

 



On 7/20/22 21:30, Peter Wang wrote:
On 7/21/22 5:40 AM, Bart Van Assche wrote:
On 7/19/22 06:02, peter.wang@xxxxxxxxxxxx wrote:
-    pm_runtime_get_sync(hba->dev);
+    /* Wait ufshcd_wl_shutdown clear ufs state, timeout 500 ms */
+    while (!ufshcd_is_ufs_dev_poweroff(hba) || !ufshcd_is_link_off(hba)) {
+        if (ktime_after(ktime_get(), timeout))
+            goto out;
+        msleep(1);
+    }

Please explain why this wait loop has been introduced.

Both ufshcd_shutdown and ufshcd_wl_shutdown could run concurrently.

Are you sure of this? In drivers/base/core.c I see a sequential loop in the device_shutdown() function. So how could two shutdown functions run concurrently?

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