On 4/11/22 11:19, Tushar Nimkar wrote:
Hi linux-pm/linux-scsi,
Below is flow which calls scsi_autopm_put_device()Process -1
ufshcd_async_scan context (process 1)
scsi_autopm_put_device() //0:0:0:0
I am having trouble following your description. What function is calling
scsi_autopm_put_device() here?
pm_runtime_put_sync()
__pm_runtime_idle()
rpm_idle() -- RPM_GET_PUT(4)
__rpm_callback
scsi_runtime_idle()
pm_runtime_mark_last_busy()
pm_runtime_autosuspend() --[A]
rpm_suspend() -- RPM_AUTO(8)
pm_runtime_autosuspend_expiration() use_autosuspend is false return 0 --- [B]
__update_runtime_status to RPM_SUSPENDING
__rpm_callback()
__rpm_put_suppliers(dev, false)
__update_runtime_status to RPM_SUSPENDED
rpm_suspend_suppliers()
rpm_idle() for supplier -- RPM_ASYNC(1) return (-EAGAIN) [ Other consumer active for supplier]
rpm_suspend() – END with return=0
scsi_runtime_idle() END return (-EBUSY) always.
Not following here either. Which device is EBUSY and why?
Thanks,
[1]: https://lore.kernel.org/lkml/4748074.GXAFRqVoOG@kreacher/T/
[2]: https://lkml.org/lkml/2022/10/12/259
Thanks,
Tushar Nimkar