[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <eb4cd8f151c43e5754bb7725bce3e8ee34a49b51.camel@gmail.com>
Date: Tue, 22 Dec 2020 21:57:12 +0100
From: Bean Huo <huobean@...il.com>
To: Can Guo <cang@...eaurora.org>,
Stanley Chu <stanley.chu@...iatek.com>
Cc: alim.akhtar@...sung.com, avri.altman@....com,
asutoshd@...eaurora.org, jejb@...ux.ibm.com,
martin.petersen@...cle.com, beanhuo@...ron.com, bvanassche@....org,
tomas.winkler@...el.com, linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 1/7] scsi: ufs: Add "wb_on" sysfs node to control WB
on/off
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.
Powered by blists - more mailing lists