RE: [PATCH v3 2/2] scsi: ufs: Add HCI capabilities sysfs group

From: Avri Altman
Date: Sun Aug 11 2024 - 10:00:34 EST


> On Sun, Aug 11, 2024 at 06:19:49AM +0000, Avri Altman wrote:
> > > On Fri, Aug 09, 2024 at 10:23:31AM +0300, Avri Altman wrote:
> > > > The standard register map of UFSHCI is comprised of several groups.
> > > > The first group (starting from offset 0x00), is the host capabilities group.
> > > > It contains some interesting information, that otherwise is not
> > > > available, e.g. the UFS version of the platform etc.
> > > >
> > > > Reviewed-by: Keoseong Park <keosung.park@xxxxxxxxxxx>
> > > > Reviewed-by: Bart Van Assche <bvanassche@xxxxxxx>
> > > > Signed-off-by: Avri Altman <avri.altman@xxxxxxx>
> > > > ---
> > > > Documentation/ABI/testing/sysfs-driver-ufs | 42 ++++++++++
> > > > drivers/ufs/core/ufs-sysfs.c | 95 ++++++++++++++++++++++
> > > > 2 files changed, 137 insertions(+)
> > > >
> > > > diff --git a/Documentation/ABI/testing/sysfs-driver-ufs
> > > > b/Documentation/ABI/testing/sysfs-driver-ufs
> > > > index fe943ce76c60..b6e0c3b806fd 100644
> > > > --- a/Documentation/ABI/testing/sysfs-driver-ufs
> > > > +++ b/Documentation/ABI/testing/sysfs-driver-ufs
> > > > @@ -1532,3 +1532,45 @@ Contact: Bean Huo <beanhuo@xxxxxxxxxx>
> > > > Description:
> > > > rtc_update_ms indicates how often the host should
> > > > synchronize or
> > > update the
> > > > UFS RTC. If set to 0, this will disable UFS RTC periodic update.
> > > > +
> > > > +What: /sys/devices/platform/.../ufshci_capabilities/capabilities
> > > > +Date: August 2024
> > > > +Contact: Avri Altman <avri.altman@xxxxxxx>
> > > > +Description:
> > > > + Host Capabilities register group: host controller capabilities register.
> > > > + Symbol - CAP. Offset: 0x00 - 0x03.
> > >
> > > This doesn't look like an ABI description. You are merely specifying
> > > the register name and offset that gets accessed while reading this attribute.
> > >
> > > Also, I'm not sure if we really want to expose HCI/MCQ capabilities as sysfs
> ABI.
> > Why not?
>
> sysfs is an userspace ABI. The information that is exposed is supposed to be
> consumed by the sysadmins/userspace applications.
>
> Looking at the contents of the capabilities, I don't think anyone could interpret
> what is being exposed unless they have access to the spec (which is not free).
>
> > Like the cover letter say, this info is otherwise unavailable.
>
> There are other ways to expose this information too, like debugfs. But what
> exactly do you want users to do with it?
OK. Will drop those.

Thanks,
Avri

>
> - Mani
>
> --
> மணிவண்ணன் சதாசிவம்