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)
Sun, Jun 23, 3:01 PM
Unknown Object (File)
Apr 30 2024, 8:40 PM
Unknown Object (File)
Apr 27 2024, 12:56 PM
Unknown Object (File)
Apr 27 2024, 12:14 PM
Unknown Object (File)
Apr 27 2024, 12:13 PM
Unknown Object (File)
Apr 27 2024, 11:46 AM
Unknown Object (File)
Apr 24 2024, 8:55 PM
Unknown Object (File)
Apr 24 2024, 8:53 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