Skip to content

scsi: ufs: core: Add debugfs for PA TFS/FEC error counters

Po-Wen Kao linux-scsi lkml stable 3 versions – Applied

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

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 3 repliesApplied
  2. v22 patches 4 repliesSuperseded
  3. v11 patch 1 replySuperseded

Changes in v3 from the cover letter

- Split the ufshcd_remove() teardown fix into patch 1 with Fixes and stable tags.
- Patch 2: Initialize debugfs_ee_work and debugfs_ee_rate_limit_ms before IRQs are enabled via ufs_debugfs_ee_init(), and document the later fault-injection attribute initialization.
- Patch 3: Gate host/ and device/ on UniPro version (PA_LOCALVERINFO / PA_REMOTEVERINFO >= UFS_UNIPRO_VER_3_0), merge the duplicated host and device attribute arrays into one via debugfs_create_file_aux_num(), update the hba_from_file() comment, and clarify the 64-bit read/reset comments.

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/3scsi: ufs: core: Remove debugfs before removing SCSI hostdrivers/ufs/core/ufs-debugfs.c drivers/ufs/core/ufshcd.c+3 -10 replies
2/3scsi: ufs: core: Defer debugfs init until after device initdrivers/ufs/core/ufs-debugfs.c drivers/ufs/core/ufs-debugfs.h drivers/ufs/core/ufshcd.c+12 -80 replies
3/3scsi: ufs: core: Add debugfs for PA TFS/FEC error countersdrivers/ufs/core/ufs-debugfs.c include/ufs/unipro.h+237 -20 replies

Reviews trailers per patch

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

PatchBart Van AsschePeter Wang
SeriesR-b R-b
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/3] scsi: ufs: core: Add debugfs for PA TFS/FEC error counters

From: Brian Kao <[email protected]>

This series exposes the MIPI UniPro v3.0 PA layer TFS/FEC error counters (0x15C3-0x15C7) under debugfs:

/sys/kernel/debug/ufshcd/<dev>/pa_err_stats/{host,device}/

Patch 1 fixes an existing teardown race by removing debugfs and disabling debugfs_ee_work before scsi_remove_host() removes the WLUN. Patch 2 defers debugfs creation until after device init while keeping debugfs_ee_work initialization before IRQs are enabled. Patch 3 adds the PA_TFS_* and UniPro 2.0/3.0 definitions and creates pa_err_stats/{host,device}/ based on PA_LOCALVERINFO / PA_REMOTEVERINFO.

Changes in v3 (suggested by Bart Van Assche):
- Split the ufshcd_remove() teardown fix into patch 1 with Fixes and stable tags.
- Patch 2: Initialize debugfs_ee_work and debugfs_ee_rate_limit_ms before IRQs are enabled via ufs_debugfs_ee_init(), and document the later fault-injection attribute initialization.
- Patch 3: Gate host/ and device/ on UniPro version (PA_LOCALVERINFO / PA_REMOTEVERINFO >= UFS_UNIPRO_VER_3_0), merge the duplicated host and device attribute arrays into one via debugfs_create_file_aux_num(), update the hba_from_file() comment, and clarify the 64-bit read/reset comments.

Changes in v2:
- Defer ufs_debugfs_hba_init() until after device init (suggested by Peter Wang).
- Create pa_err_stats/host/ and device/ only when supported instead of returning -EOPNOTSUPP on read/write.

Brian Kao (3):
scsi: ufs: core: Remove debugfs before removing SCSI host
scsi: ufs: core: Defer debugfs init until after device init
scsi: ufs: core: Add debugfs for PA TFS/FEC error counters

 drivers/ufs/core/ufs-debugfs.c | 244 ++++++++++++++++++++++++++++++++-
 drivers/ufs/core/ufs-debugfs.h |   2 +
 drivers/ufs/core/ufshcd.c      |   8 +-
 include/ufs/unipro.h           |   9 +-
 4 files changed, 252 insertions(+), 11 deletions(-)

base-commit: 08fec21faae44fe002467976befd68e6e62969b5

Signature · 1 line
2.56.1.839.g22a8290db9-goog