[PATCH 0/2] scsi: ufs: core: Support multi-run FOM averaging during TX EQTR

From: Po-Wen Kao

Date: Fri Dec 04 2026 - 06:42:58 EST


From: Brian Kao <powenkao@xxxxxxxxxx>

Single-shot RX FOM measurements during UFS TX EQTR can exhibit
run-to-run jitter, causing suboptimal preset selection when nearby
presets have similar eye margins. This series adds configurable
multi-run FOM averaging and full-precision FOM sum ranking to TX EQTR.

Patch 1 factors the per-preset measurement steps out of
__ufshcd_tx_eqtr() into ufshcd_measure_tx_eqtr_fom() with no
functional change.

Patch 2 adds the txeq_meas_loops module parameter (default: 1, range:
1-100), repeats per-preset measurements with FOM sum ranking and
majority-vote pre-coding, counts failed RX_FOM reads as 0 against the
fixed meas_loops divisor while storing the averaged RX_FOM byte for
debugfs, and leaves preset selection unchanged at the default setting.

Brian Kao (2):
scsi: ufs: core: Factor out TX EQTR preset measurement helper
scsi: ufs: core: Support multi-run FOM averaging during TX EQTR

drivers/ufs/core/ufs-txeq.c | 207 ++++++++++++++++++++++++++++++------
1 file changed, 172 insertions(+), 35 deletions(-)


base-commit: 4ff20abe28d65a0c52f0b280008fcfb93c3ee2b2
--
2.56.1.987.g2ec0ab4260-goog