RE: [PATCH] scsi: ufs: Allow RTT negotiation

From: Avri Altman
Date: Fri May 03 2024 - 06:44:14 EST


> Avri,
>
> On 02.05.24 3:19 PM, Avri Altman wrote:
> > + /* RTT override makes sense only for UFS-4.0 and above */
> > + if (dev_info->wspecversion < 0x400)
> > + return;
> > +
> > + rtt = min_t(int, desc_buf[DEVICE_DESC_PARAM_RTT_CAP], hba->nortt);
> > + /* rtt is 2 after manufacturing */
> > + if (rtt < 3)
> > + return;
> > +
> > + if (ufshcd_query_attr_retry(hba, UPIU_QUERY_OPCODE_WRITE_ATTR,
> > + QUERY_ATTR_IDN_MAX_NUM_OF_RTT, 0, 0, &rtt))
> > + dev_err(hba->dev, "failed writing bMaxNumOfRTT\n"); }
>
> bMaxNumOfRTT is Persistent Property, do we need to re-write every time
> power cycle?
Correct.
Moreover, don't want to override use-space should it was written.
Will fix.

Thanks,
Avri

>
> Kind regards,
>
> Bean
>