[PATCH v2 0/2] scsi: ufs: core: Add debugfs for PA TFS/FEC error counters
From: Po-Wen Kao
Date: Mon Nov 23 2026 - 20:29:57 EST
From: Brian Kao <powenkao@xxxxxxxxxx>
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 defers debugfs initialization until after device init so host
and device spec versions are available. Patch 2 adds the PA_TFS_* MIB
definitions and creates pa_err_stats/{host,device}/ only when supported.
Changes in v2:
- Defer ufs_debugfs_hba_init() until after device init in patch 1
(suggested by Peter Wang).
- Create pa_err_stats/host/ and device/ only when supported instead of
returning -EOPNOTSUPP on read/write.
Link: https://lore.kernel.org/linux-scsi/20261123025745.1743640-1-powenkao@xxxxxxxxxx/
Brian Kao (2):
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 | 213 ++++++++++++++++++++++++++++++++-
drivers/ufs/core/ufshcd.c | 7 +-
include/ufs/unipro.h | 5 +
3 files changed, 220 insertions(+), 5 deletions(-)
base-commit: 08fec21faae44fe002467976befd68e6e62969b5
--
2.56.1.809.ga0b61035b5-goog