> 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.