mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Po-Wen Kao <powenkao@google.com>
To: linux-scsi@vger.kernel.org
Cc: Konstantin Vyshetsky <vkon@google.com>,
	Alim Akhtar <alim.akhtar@samsung.com>,
	 Bart Van Assche <bvanassche@acm.org>,
	Bean Huo <beanhuo@micron.com>,
	 Stanley Jhu <stanleyjhu@google.com>,
	 "James E . J . Bottomley"
	<James.Bottomley@HansenPartnership.com>,
	 "Martin K . Petersen" <mkp@kernel.org>,
	Peter Wang <peter.wang@mediatek.com>,
	 Can Guo <can.guo@oss.qualcomm.com>,
	linux-kernel@vger.kernel.org,  Brian Kao <powenkao@google.com>
Subject: [PATCH v2 0/2] scsi: ufs: core: Add debugfs for PA TFS/FEC error counters
Date: Tue, 24 Nov 2026 09:29:31 +0800	[thread overview]
Message-ID: <20261124012951.3143833-1-powenkao@google.com> (raw)

From: Brian Kao <powenkao@google.com>

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@google.com/

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


             reply	other threads:[~2026-11-24  1:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24  1:29 Po-Wen Kao [this message]
2026-11-24  1:29 ` [PATCH v2 1/2] scsi: ufs: core: Defer debugfs init until after device init Po-Wen Kao
2026-11-24  1:29 ` [PATCH v2 2/2] scsi: ufs: core: Add debugfs for PA TFS/FEC error counters Po-Wen Kao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261124012951.3143833-1-powenkao@google.com \
    --to=powenkao@google.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=alim.akhtar@samsung.com \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --cc=can.guo@oss.qualcomm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mkp@kernel.org \
    --cc=peter.wang@mediatek.com \
    --cc=stanleyjhu@google.com \
    --cc=vkon@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®