Message ID | 20240328104707.1452-1-peter.wang@mediatek.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v1] ufs: core: wlun suspend dev/link state error recovery | expand |
On 3/28/24 03:47, peter.wang@mediatek.com wrote: > diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c > index e30fd125988d..0a32f423f6a0 100644 > --- a/drivers/ufs/core/ufshcd.c > +++ b/drivers/ufs/core/ufshcd.c > @@ -9791,7 +9791,10 @@ static int __ufshcd_wl_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op) > > /* UFS device & link must be active before we enter in this function */ > if (!ufshcd_is_ufs_dev_active(hba) || !ufshcd_is_link_active(hba)) { > - ret = -EINVAL; > + /* Wait err handler finish or tirgger err recovery in this case */ > + if (!ufshcd_eh_in_progress(hba)) > + ufshcd_force_error_recovery(hba); > + ret = -EBUSY; > goto enable_scaling; > } Please fix the spelling in the above source code comment ("tirgger"). Thanks, Bart.
On Thu, 2024-03-28 at 10:31 -0700, Bart Van Assche wrote: > > External email : Please do not click links or open attachments until > you have verified the sender or the content. > On 3/28/24 03:47, peter.wang@mediatek.com wrote: > > diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c > > index e30fd125988d..0a32f423f6a0 100644 > > --- a/drivers/ufs/core/ufshcd.c > > +++ b/drivers/ufs/core/ufshcd.c > > @@ -9791,7 +9791,10 @@ static int __ufshcd_wl_suspend(struct > ufs_hba *hba, enum ufs_pm_op pm_op) > > > > /* UFS device & link must be active before we enter in this > function */ > > if (!ufshcd_is_ufs_dev_active(hba) || > !ufshcd_is_link_active(hba)) { > > -ret = -EINVAL; > > +/* Wait err handler finish or tirgger err recovery in this case > */ > > +if (!ufshcd_eh_in_progress(hba)) > > +ufshcd_force_error_recovery(hba); > > +ret = -EBUSY; > > goto enable_scaling; > > } > > Please fix the spelling in the above source code comment ("tirgger"). > > Thanks, > > Bart. > > Hi Bart, Will fix typo next version. Thanks Peter
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index e30fd125988d..0a32f423f6a0 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -9791,7 +9791,10 @@ static int __ufshcd_wl_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op) /* UFS device & link must be active before we enter in this function */ if (!ufshcd_is_ufs_dev_active(hba) || !ufshcd_is_link_active(hba)) { - ret = -EINVAL; + /* Wait err handler finish or tirgger err recovery in this case */ + if (!ufshcd_eh_in_progress(hba)) + ufshcd_force_error_recovery(hba); + ret = -EBUSY; goto enable_scaling; }