]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
usb(4): Automagically apply all quirks for USB mass storage devices.
authorHans Petter Selasky <hselasky@FreeBSD.org>
Mon, 21 Feb 2022 08:24:28 +0000 (09:24 +0100)
committerHans Petter Selasky <hselasky@FreeBSD.org>
Thu, 24 Feb 2022 09:28:55 +0000 (10:28 +0100)
commit7520b88860d7a79432e12ffcc47056844518bb62
tree42bf3939940066dd8a0235fac7d0bead27210d5f
parent68445e349bf4772434247f2f958a672f44403dd2
usb(4): Automagically apply all quirks for USB mass storage devices.

Currently there are five quirks the USB stack tries to automagically detect:
- UQ_MSC_NO_PREVENT_ALLOW
- UQ_MSC_NO_SYNC_CACHE
- UQ_MSC_NO_TEST_UNIT_READY
- UQ_MSC_NO_GETMAXLUN
- UQ_MSC_NO_START_STOP

If any of the quirks above are set, no further quirks will be probed.

If any of the USB mass storage tests fail, the USB device is
re-enumerated as a last resort to clear any error states from the
device. Then the USB stack will try to probe and attach the umass<N>
device passing the detected quirks.

While at it give more details in dmesg about what is going on.

Tested by: several
Submitted by: Idwer Vollering <vidwer_fbsdbugs@gmail.com>
Differential Revision: https://reviews.freebsd.org/D30919
MFC after: 1 week
Sponsored by: NVIDIA Networking
sys/dev/usb/storage/umass.c
sys/dev/usb/usb_device.c
sys/dev/usb/usb_msctest.c
sys/dev/usb/usb_msctest.h