RE: [PATCH v4 3/3] scsi: ufs: sysfs: Make max_number_of_rtt read-write

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

 



> On 5/15/24 23:51, Avri Altman wrote:
> > +static ssize_t max_number_of_rtt_store(struct device *dev,
> > +                                  struct device_attribute *attr,
> > +                                  const char *buf, size_t count)
> > +{
> > +     struct ufs_hba *hba = dev_get_drvdata(dev);
> > +     unsigned int rtt;
> > +     int ret;
> > +
> > +     if (kstrtouint(buf, 0, &rtt))
> > +             return -EINVAL;
> > +
> > +     down(&hba->host_sem);
> > +     if (!ufshcd_is_user_access_allowed(hba)) {
> > +             ret = -EBUSY;
> > +             goto out;
> > +     }
> > +
> > +     ufshcd_rpm_get_sync(hba);
> > +     ret = ufshcd_query_attr(hba, UPIU_QUERY_OPCODE_WRITE_ATTR,
> > +             QUERY_ATTR_IDN_MAX_NUM_OF_RTT, 0, 0, &rtt);
> > +     ufshcd_rpm_put_sync(hba);
> > +
> > +out:
> > +     up(&hba->host_sem);
> > +     return ret < 0 ? ret : count;
> > +}
> 
> Since modifying RTT is only allowed while no commands are in progress,
> shouldn't max_number_of_rtt_store() freeze and unfreeze all request
> queues of all logical units?
Done.

Thanks,
Avri

> 
> Thanks,
> 
> Bart.





[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