Re: [PATCH v8 3/3] scsi: ufs: core: Limit early link recovery in the error handler to runtime PM
From: Bean Huo
Date: Mon Nov 09 2026 - 12:15:57 EST
On Mon, 2026-11-09 at 13:09 +0900, HOYOUNG SEO wrote:
> diff --git a/drivers/ufs/core/ufshcd-priv.h b/drivers/ufs/core/ufshcd-priv.h
> index e55c2a02c1f5..ae3eaf5ab017 100644
> --- a/drivers/ufs/core/ufshcd-priv.h
> +++ b/drivers/ufs/core/ufshcd-priv.h
> @@ -413,6 +413,19 @@ static inline void ufshcd_rpm_put(struct ufs_hba *hba)
> pm_runtime_put(&hba->ufs_device_wlun->sdev_gendev);
> }
>
> +/* Whether a runtime suspend or resume of the WLUN is in progress. */
> +static inline bool ufshcd_rpm_transition_in_progress(struct ufs_hba *hba)
> +{
> +#ifdef CONFIG_PM
> + enum rpm_status status =
> + READ_ONCE(hba->ufs_device_wlun-
> >sdev_gendev.power.runtime_status);
> +
> + return status == RPM_SUSPENDING || status == RPM_RESUMING;
should the helper also check pm_op_in_progress?
return hba->pm_op_in_progress && (status == RPM_SUSPENDING || status ==
RPM_RESUMING);
checking (status == RPM_SUSPENDING || status == RPM_RESUMING) fixes for system
PM;
Checking pm_op_in_progress limits the early path to __ufshcd_wl_suspend() and
__ufshcd_wl_resume() during runtime PM, it was before this patch.
Or what else I missed?
Kind regards,
Bean