Re: [PATCH v3 04/12] scsi: ufs: core: Add support for TX Equalization

From: Can Guo

Date: Thu Mar 19 2026 - 01:42:29 EST


Hi Peter,

On 3/17/2026 9:08 PM, Peter Wang (王信友) wrote:

On Tue, 2026-03-17 at 15:22 +0800, Can Guo wrote:
> Here is the consideration:
> > 1. Scanning all 64 PreShoot/DeEmphasis combinations cost (much) more
> time
>    a. This could impact bootup KPI
>    b. During TX EQTR, IOs are paused, when one conducts a re-
> training,
> the IOs could
>         be paused for too long.
>
Hi Can,

Yes, it will take some time, but according to the specification,
we need to find the best FOM, so the default value should still
follow the specification.
It is just a default value of module parameter , one can change it via boot
cmdline. But since you have asked it twice, I will change the default value to
true in next version.


> 2. As per our study in the past few months, the optimal/best
> combination
> is most
>      likely within the 8 presets, which is true for both Host TX
> lanes
> and Device TX lanes.
>
Host may be true, but there are so many devices, and new UFS 5.0
devices will keep being released in the future. How can we
guarantee that the optimal/best combination is most likely
within the 8 presets?


> 3. Even if sometime the optimal settings which fall out of the 8
> presets, they are very
>      close to optimal one found within the 8 presets.
>
Could you share what led you to this conclusion?
From the scores reported by each vendor, it’s hard for us to
determine what a difference of a few points actually means.


> So, scanning the 8 presets only is more cost-efficient.
> > > > > +ufshcd_tx_eqtr_result_examine(struct ufshcd_tx_eq_params
> > > *old_params,
> > > +                             struct ufshcd_tx_eq_params
> > > *new_params)
> > > +{
> > > +       int lane;
> > > +
> > > +       if (!old_params->is_valid)
> > > +               return;
> > > > Is is_valid always false, causing a return here?
> It can be valid if we are here (again) because one conducts a re-
> training.
> >
Then, should this function be moved to [07/12], which supports
retraining?
Sure, I will move in next version.

Thanks,
Can Guo.

Thanks.
Peter



************* MEDIATEK Confidentiality Notice ********************
The information contained in this e-mail message (including any
attachments) may be confidential, proprietary, privileged, or otherwise
exempt from disclosure under applicable laws. It is intended to be
conveyed only to the designated recipient(s). Any use, dissemination,
distribution, printing, retaining or copying of this e-mail (including its
attachments) by unintended recipient(s) is strictly prohibited and may
be unlawful. If you are not an intended recipient of this e-mail, or believe
that you have received this e-mail in error, please notify the sender
immediately (by replying to this e-mail), delete any and all copies of
this e-mail (including any attachments) from your system, and do not
disclose the content of this e-mail to any other person. Thank you!