Skip to content

scsi: ufs: Harden TX EQTR error handling paths

Can Guo linux-arm-kernel linux-arm-msm linux-mediatek linux-scsi lkml 2 versions – Applied

Status from this message: Applied to 7.3/scsi-staging, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 7 repliesApplied
  2. v13 patches 8 repliesSuperseded

Changes in v2 from the cover letter

- Adopted Peter's comment (Patch 2)

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/3scsi: ufs: ufs-qcom: Restore TX Equalization settings on FOM failuredrivers/ufs/host/ufs-qcom.c+4 -51 reply
2/3scsi: ufs: core: Tolerate RX_FOM read failures in TX EQTRdrivers/ufs/core/ufs-txeq.c+14 -52 replies
3/3scsi: ufs: core: Always run tx_eqtr POST_CHANGE notifydrivers/ufs/core/ufs-txeq.c+10 -41 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchManivannan SadhasivamPeter WangBean HuoZiqi Chen
SeriesR-b
1/3R-b
2/3R-b R-b
3/3R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/3] scsi: ufs: Harden TX EQTR error handling paths

TX Equalization training currently has a few error-path gaps that can make the flow brittle and can leave variant/device cleanup incomplete.

This series hardens TX EQTR in three places:

1. ufs-qcom: route SW FOM setup failures through the shared cleanup path so temporary device TX EQ settings are restored and link recovery is always attempted before exit.
2. core: treat RX_FOM DME read failures as best effort so TX EQTR can continue, and force failed lanes to deterministic 0 FOM.
3. core: always run tx_eqtr POST_CHANGE notify once PRE_CHANGE succeeds, even when TX EQTR fails, so variant cleanup is not skipped.

Together these changes improve TX EQTR robustness without changing the normal success path.

Dependency note:
PATCH 3/3 depends on the patch below, which is still under review:
https://lore.kernel.org/all/[email protected]/

Please apply this series on top of that patch (or a tree containing it).

v1 -> v2:
- Adopted Peter's comment (Patch 2)

Can Guo (3):
scsi: ufs: ufs-qcom: Restore TX Equalization settings on FOM failure
scsi: ufs: core: Tolerate RX_FOM read failures in TX EQTR
scsi: ufs: core: Always run tx_eqtr POST_CHANGE notify

 drivers/ufs/core/ufs-txeq.c | 33 ++++++++++++++++++++++++---------
 drivers/ufs/host/ufs-qcom.c |  9 ++++-----
 2 files changed, 28 insertions(+), 14 deletions(-)
Signature · 1 line
2.34.1