opnsense-src/sys/dev/usb
Hans Petter Selasky 7520b88860 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
2022-02-24 10:28:55 +01:00
..
controller usb: Make ext_resources non-optional 2022-02-21 17:28:52 +01:00
gadget usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
input usb: real freebsd32 support for most ioctls 2021-12-17 21:28:13 +00:00
misc Fix typo on "Celsius" 2021-11-18 23:05:32 -07:00
net Create wrapper for Giant taken for newbus 2021-12-09 17:04:45 -07:00
quirk Add more USB quirks for Kingston devices. 2021-04-22 12:40:29 +02:00
serial u3g: Add support Quectel EM12-G modem. 2022-01-29 09:59:20 +00:00
storage usb(4): Automagically apply all quirks for USB mass storage devices. 2022-02-24 10:28:55 +01:00
template usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
video usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
wlan net80211/drivers: improve ieee80211_rx_stats for band 2021-10-22 09:55:54 +00:00
ufm_ioctl.h Regularize my copyright notice 2019-12-04 16:56:11 +00:00
uftdiio.h
uled_ioctl.h
usb.h Narrow down the probe range for if_ure(4) compatible devices 2021-06-04 15:51:01 +02:00
usb_bus.h Make USB statistics per device instead of per bus. 2019-12-27 20:29:13 +00:00
usb_busdma.c Fix busdma resource leak on usb device detach. 2021-09-28 13:29:10 -06:00
usb_busdma.h Fix busdma resource leak on usb device detach. 2021-09-28 13:29:10 -06:00
usb_cdc.h
usb_controller.h usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
usb_core.c
usb_core.h Use more standard types for manipulating pointers. 2020-12-16 00:27:28 +00:00
usb_debug.c Update usb_timings_sysctl_handler() to accept any value for timings between 2021-05-18 15:52:41 +02:00
usb_debug.h
usb_dev.c usb: real freebsd32 support for most ioctls 2021-12-17 21:28:13 +00:00
usb_dev.h usb: add 32-bit compat for FIFOs 2021-12-17 21:28:14 +00:00
usb_device.c usb(4): Automagically apply all quirks for USB mass storage devices. 2022-02-24 10:28:55 +01:00
usb_device.h Refresh the USB device strings when a USB device is re-enumerated. 2020-05-11 20:55:04 +00:00
usb_dynamic.c
usb_dynamic.h
usb_endian.h
usb_error.c
usb_fdt_support.c
usb_fdt_support.h
usb_freebsd.h usb(4): Stop checking for failures from malloc(M_WAITOK). 2020-07-22 14:32:47 +00:00
usb_freebsd_loader.h usb(4): Stop checking for failures from malloc(M_WAITOK). 2020-07-22 14:32:47 +00:00
usb_generic.c usb(4): Fix build on 32-bit platforms after 0ec590d24e. 2021-12-18 21:31:58 +01:00
usb_generic.h Implement the USB_GET_DEVICEINFO ioctl(2) for uhid(4). 2020-10-31 21:53:23 +00:00
usb_handle_request.c usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
usb_hid.c Factor-out hardware-independent part of USB HID support to new module 2021-01-08 02:18:42 +03:00
usb_hub.c usb(4): Ignore port resume failures. 2022-02-02 13:00:48 +01:00
usb_hub.h
usb_hub_acpi.c newbus: Move from bus_child_{pnpinfo,location}_src to bus_child_{pnpinfo,location} with sbuf 2021-06-22 20:52:06 -06:00
usb_hub_private.h newbus: Move from bus_child_{pnpinfo,location}_src to bus_child_{pnpinfo,location} with sbuf 2021-06-22 20:52:06 -06:00
usb_if.m
usb_ioctl.h usb: remove COMPAT_32BIT ifdefs 2021-12-17 21:28:39 +00:00
usb_lookup.c usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
usb_mbuf.c usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
usb_mbuf.h
usb_msctest.c usb(4): Automagically apply all quirks for USB mass storage devices. 2022-02-24 10:28:55 +01:00
usb_msctest.h usb(4): Automagically apply all quirks for USB mass storage devices. 2022-02-24 10:28:55 +01:00
usb_parse.c Improve handling of alternate settings in the USB stack. 2020-12-15 11:51:17 +00:00
usb_pci.h
usb_pf.c usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
usb_pf.h Fix build of USB bootloader code by adding checks for _STANDALONE being defined. 2020-11-18 13:22:22 +00:00
usb_process.c usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
usb_process.h
usb_request.c Improve handling of alternate settings in the USB stack. 2020-12-15 12:05:07 +00:00
usb_request.h
usb_transfer.c Send a zero-length-packet first when opening a BULK endpoint for USB serial 2021-07-15 12:11:53 +02:00
usb_transfer.h Cleanup unused USB enums. 2021-07-15 12:38:42 +02:00
usb_util.c
usb_util.h
usbdevs u3g: Add support Quectel EM12-G modem. 2022-01-29 09:59:20 +00:00
usbdi.h Send a zero-length-packet first when opening a BULK endpoint for USB serial 2021-07-15 12:11:53 +02:00
usbdi_util.h
usbhid.h hid: Chase for HID function name changes in existing USB HID drivers 2021-01-08 02:18:42 +03:00