Re: [PATCH v5 1/7] scsi: ufs: Add "wb_on" sysfs node to control WB on/off

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux