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

From: Peter Wang (王信友)

Date: Tue Mar 17 2026 - 09:26:48 EST


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.


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

Thanks.
Peter