Module Name: src Committed By: martin Date: Tue Apr 16 18:45:39 UTC 2024
Modified Files: src/share/man/man4 [netbsd-10]: ugen.4 src/sys/dev/usb [netbsd-10]: uftdi.c ugen.c usbdevices.config Log Message: Pull up following revision(s) (requested by thorpej in ticket #649): sys/dev/usb/uftdi.c: revision 1.77 share/man/man4/ugen.4: revision 1.39 sys/dev/usb/ugen.c: revision 1.176 sys/dev/usb/usbdevices.config: revision 1.43 Define a "flags 1" config directive for ugenif, which is similar to ugen's, but rather forces the ugenif to match at the *lowest* match priority rather than the highest. This allows ugenif to claim only otherwise unclaimed interfaces. Add a "match quirk" mechanism to the uftdi driver that allows it to selectively reject individual interfaces based on the combination of - Vendor ID - Product ID - Interface number - Vendor string - Product string This is necessary[*] to allow some devices that would otherwise match uftdi (and thus instantiate a ucom) to be matched by ugenif instead, which is required to make the device available to libusb1. [*] ...due to a deficiency in the USB stack that does not provide a mechanism for a user-space driver to claim a device from a kernel driver and then return it back at a later time. Use this new match quirk mechanism to reject "interface 1" of the FTDI 2232C-based Tigard debug board; On this board, "interface 0" is brought out to regular TTL-level UART pins, but "interface 1" is brought out to SWD and JTAG headers, and is really only useful when used with something like openocd. Because the FTDI 2232C on this board just uses the standard FTDI vendor and product IDs, it can only be distinguished by the strings, which cannot be specified usbdevices.config, thus necessitating the match quirk entry (that works in combination with the ugenif entry added in usbdevices.config). To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.38.6.1 src/share/man/man4/ugen.4 cvs rdiff -u -r1.76 -r1.76.6.1 src/sys/dev/usb/uftdi.c cvs rdiff -u -r1.171 -r1.171.2.1 src/sys/dev/usb/ugen.c cvs rdiff -u -r1.42 -r1.42.10.1 src/sys/dev/usb/usbdevices.config Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.