Page MenuHomeFreeBSD

usb: use only usb_devinfo() in device_set_usb_desc()
ClosedPublic

Authored by christos on Jan 9 2024, 9:12 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Oct 19, 6:35 PM
Unknown Object (File)
Sat, Oct 19, 6:19 PM
Unknown Object (File)
Sat, Oct 19, 6:19 PM
Unknown Object (File)
Sat, Oct 19, 5:56 PM
Unknown Object (File)
Sep 18 2024, 12:09 AM
Unknown Object (File)
Sep 17 2024, 5:20 PM
Unknown Object (File)
Sep 17 2024, 2:41 AM
Unknown Object (File)
Sep 16 2024, 6:09 PM
Subscribers
None

Details

Summary

device_set_usb_desc() first tries to fetch device information through
the iInterface descriptor, otherwise it falls back to usb_devinfo().
Since usb_devinfo() is both guaranteed to work, and is more verbose, get
rid of the initial iInterface attempt.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

Test Plan

Device with iInterface. Before:

uaudio0: <Scarlett Solo USB> on usbus0

After:

uaudio0: <Focusrite Scarlett Solo USB, class 239/2, rev 2.00/2.80, addr 6> on usbus0

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

christos created this revision.

I think this is probably ok. I tried dumping config descriptors from all of my USB devices and most either don't have an interface description, or the one they have is less useful than the generic device information.

This revision is now accepted and ready to land.Jan 10 2024, 10:25 PM