lkml.org 
[lkml]   [2020]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v5 1/7] scsi: ufs: Add "wb_on" sysfs node to control WB on/off
From
Date
On Tue, 2020-12-22 at 14:12 +0800, Can Guo wrote:
> > > + return -EOPNOTSUPP;
> > > +
> > > + if (kstrtouint(buf, 0, &wb_enable))
> > > + return -EINVAL;
> > > +
> > > + if (wb_enable != 0 && wb_enable != 1)
> > > + return -EINVAL;
> > > +
> > > + pm_runtime_get_sync(hba->dev);
> > > + res = ufshcd_wb_ctrl(hba, wb_enable);
> >
> > May this operation race with UFS shutdown flow?
> >
> > To be more clear, ufshcd_wb_ctrl() here may be executed after host
> > clock
> > is disabled by shutdown flow?
> >
> > If yes, we need to avoid it.
>
> I have the same doubt - can user still access sysfs nodes after
> system
> starts to run shutdown routines? If yes, then we need to remove all
> UFS
> sysfs nodes in ufshcd_shutdown().
>

No, we shouldn't do in this way, user space complains this. I think
the nodes in the sysfs can be shileded write, but the nodes shouldn't
be flash of its presence frequently.

Thanks,
Bean


> Thanks,
>
> Can Guo.

\
 
 \ /
  Last update: 2020-12-22 21:59    [W:0.113 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site