usb: Export BOS descriptor to sysfs
A message that is not in the archive (sent off-list or not yet received): [email protected]
Greg KH
maintainerOn Tue, Mar 05, 2024 at 11:33:56AM -0800, Elbert Mai wrote:
<snip>
For some reason you forgot to cc: [email protected] and only sent this to me. Added it back now...
Quoted 11 lines
---
Changes in v3:
- Cosmetic only. Made a comment less confusing.
Changes in v2:
- Rename tobos_descriptors(plural) since the attribute contains the entire BOS, not just the first descriptor in it.
- Use binary attribute groups to let driver core handle attribute creation for both descriptors andbos_descriptors.
- The attribute is visible in sysfs only if the BOS is present in the USB device.
Quoted 7 lines
I've ran the prior patches against
scripts/checkpatch.pland it seems to be okay with the comment style. But I agree the comment could use some work. The point of the comment was to show that not checking for the descriptors attribute is intentional and not an oversight.So here's a follow-on patch that hopefully made that particular comment a bit less confusing. Nothing else was changed.
I already applied your v2 patch, so I need a commit that goes on top of that, unless you want me to revert your patch from the tree (I'd not recommend that.)
Also, one thing:
Quoted 8 lines
Documentation/ABI/testing/sysfs-bus-usb +0
-0@@ -293,3 +293,13 @@ Description: USB 3.2 adds Dual-lane support, 2 rx and 2 tx -lanes over Type-C. Inter-Chip SSIC devices support asymmetric lanes up to 4 lanes per direction. Devices before USB 3.2 are single lane (tx_lanes = 1)
Documentation/ABI/testing/sysfs-bus-usb Description: · line 305
Quoted 10 lines
Documentation/ABI/testing/sysfs-bus-usb +10
-0+ +What: /sys/bus/usb/devices/.../bos_descriptors +Date: March 2024 +Contact: Elbert Mai <[email protected]> +Description: + Binary file containing the cached binary device object store (BOS) + of the device. This consists of the BOS descriptor followed by the + set of device capability descriptors. All descriptors read from + this file are in bus-endian format. Note that the kernel will not + request the BOS from a device if its bcdUSB is less than 0x0201.
I moved this to the entry after the "descriptors" description in this file, and dropped the "..." portion to show the correct string, as the "..." doesn't make sense here, right?
thanks,
greg k-h