opnsense-src/sys/dev/usb/storage
Bjoern A. Zeeb 4c7dbe9f79 usb: umass: add SCSIEJECT quirk and fix RTW8821CU_CD (USB mode switch)
Several Realtek (and lots other) USB dongles present themselves as
CDROM device first.  Upon eject they do a mode switch and suddenly
are a different kind of device (sometimes even with different IDs),
e.g., a wireless dongle.

In order to avoid the CDROM stage and rather than adding the quirk
handling to more drivers, add support to umass and if enabled
automatically eject the "CDROM" to make it the real device.

Longer-term some other drivers could stop using their hand-rolled
support for this.  It is unclear as-to how much we need the list of
(eject) quirks from u3g here, or if these are very specific to that
kind of devices.

Sponsored by:	The FreeBSD Foundation
Fixes:		b3b6a959c8, 9c0cce3283
Reviewed by:	imp
Differential Revision: https://reviews.freebsd.org/D54901

(cherry picked from commit b4daeded66b5e950ed8e618d66915b863c2414b1)
2026-03-11 16:53:25 +00:00
..
cfumass.c
rio500_usb.h
umass.c usb: umass: add SCSIEJECT quirk and fix RTW8821CU_CD (USB mode switch) 2026-03-11 16:53:25 +00:00
urio.c
ustorage_fs.c