From: Johnson Tsai <wenjie.tsai@realtek.com>
To: Greg KH <gregkh@linuxfoundation.org>,
Johannes Berg <johannes@sipsolutions.net>
Cc: Ping-Ke Shih <pkshih@realtek.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"driver-core@lists.linux.dev" <driver-core@lists.linux.dev>,
"sabae@valvesoftware.com" <sabae@valvesoftware.com>,
Charles Lohr <charlesl@valvesoftware.com>
Subject: RE: [RFC rtw-next 1/2] wifi: rtw89: usb: add hw_info sysfs attribute
Date: Wed, 20 May 2026 09:41:46 +0000 [thread overview]
Message-ID: <b8640de28c5e4a94a3c2bbc3a101c1fa@realtek.com> (raw)
In-Reply-To: <2026051957-refract-barge-b21e@gregkh>
On Tuesday, May 19, 2026 20:23, Greg KH <gregkh@linuxfoundation.org> wrote:
> On Tue, May 19, 2026 at 02:11:32PM +0200, Johannes Berg wrote:
> > Hi,
> >
> > > > Example usage from user-space:
> > > > $ cat /sys/bus/usb/devices/2-3.1.2:1.0/hw_info
> > > > SN: 36 42 00 01 23
> > > > UUID: aa ec 2b 7c 0a 55 47 27 8d e0 b3 0f eb cc bb aa
> >
> > Sysfs has a "one value per file" rule (soft rule according to the
> > docs, but harder in practice, I believe), so seems if anything that
> > should be two files. Maybe a UUID should also be formatted as such
> > with %pU or similar.
>
> That should be 2 separate sysfs files please.
>
> And yes, use %pU.
The v2 patch will use separate `sn` and `uuid` attributes, with `uuid`
formatted via `%pU`. We also removed the spaces in `sn` to provide a clean
string.
Example usage from user-space:
$ cat /sys/bus/usb/devices/2-3.1.2:1.0/sn
3642000123
$ cat /sys/bus/usb/devices/2-3.1.2:1.0/uuid
aaec2b7c-0a55-4727-8de0-b30febccbbaa
>
> And be careful about exposing serial numbers to userspace, some systems
> don't like normal users to read them so be sure to get the permissions correct.
> We had to add some USB code for ALLOW_SERIAL_NUMBER to make it so that
> systems can handle this if they want to.
>
> And shouldn't this just be the USB serial number to start with? Why is there a
> different string here? We already have a sysfs file for this value.
Regarding the serial number and permission design, these are requirements
from Valve, so we have CC'd them here to provide the background.
Hi Elliot and Charles, could you please help explain the requirements and use case here?
next prev parent reply other threads:[~2026-05-20 9:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-19 7:24 [RFC rtw-next 1/2] wifi: rtw89: usb: add hw_info sysfs attribute Ping-Ke Shih
2026-05-19 7:24 ` [RFC rtw-next 2/2] wifi: rtw89: usb: add sysfs write example Ping-Ke Shih
2026-05-19 7:37 ` [RFC rtw-next 1/2] wifi: rtw89: usb: add hw_info sysfs attribute Ping-Ke Shih
2026-05-19 12:11 ` Johannes Berg
2026-05-19 12:22 ` Greg KH
2026-05-20 9:41 ` Johnson Tsai [this message]
2026-05-20 11:36 ` Greg KH
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=b8640de28c5e4a94a3c2bbc3a101c1fa@realtek.com \
--to=wenjie.tsai@realtek.com \
--cc=charlesl@valvesoftware.com \
--cc=driver-core@lists.linux.dev \
--cc=gregkh@linuxfoundation.org \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=pkshih@realtek.com \
--cc=sabae@valvesoftware.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