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).diff -r1.38 -r1.38.6.1 src/share/man/man4/ugen.4
(martin)
--- src/share/man/man4/ugen.4 2020/08/28 16:07:49 1.38
+++ src/share/man/man4/ugen.4 2024/04/16 18:45:39 1.38.6.1
--- src/sys/dev/usb/uftdi.c 2021/08/07 16:19:17 1.76
+++ src/sys/dev/usb/uftdi.c 2024/04/16 18:45:39 1.76.6.1
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: uftdi.c,v 1.76 2021/08/07 16:19:17 thorpej Exp $ */ | 1 | /* $NetBSD: uftdi.c,v 1.76.6.1 2024/04/16 18:45:39 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2000 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2000 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by Lennart Augustsson (lennart@augustsson.net). | 8 | * by Lennart Augustsson (lennart@augustsson.net). | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -20,43 +20,44 @@ | @@ -20,43 +20,44 @@ | |||
20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | 20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | |
21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
29 | * POSSIBILITY OF SUCH DAMAGE. | 29 | * POSSIBILITY OF SUCH DAMAGE. | |
30 | */ | 30 | */ | |
31 | 31 | |||
32 | #include <sys/cdefs.h> | 32 | #include <sys/cdefs.h> | |
33 | __KERNEL_RCSID(0, "$NetBSD: uftdi.c,v 1.76 2021/08/07 16:19:17 thorpej Exp $"); | 33 | __KERNEL_RCSID(0, "$NetBSD: uftdi.c,v 1.76.6.1 2024/04/16 18:45:39 martin Exp $"); | |
34 | 34 | |||
35 | #ifdef _KERNEL_OPT | 35 | #ifdef _KERNEL_OPT | |
36 | #include "opt_usb.h" | 36 | #include "opt_usb.h" | |
37 | #endif | 37 | #endif | |
38 | 38 | |||
39 | #include <sys/param.h> | 39 | #include <sys/param.h> | |
40 | #include <sys/systm.h> | 40 | #include <sys/systm.h> | |
41 | #include <sys/kernel.h> | 41 | #include <sys/kernel.h> | |
42 | #include <sys/device.h> | 42 | #include <sys/device.h> | |
43 | #include <sys/conf.h> | 43 | #include <sys/conf.h> | |
44 | #include <sys/tty.h> | 44 | #include <sys/tty.h> | |
45 | 45 | |||
46 | #include <dev/usb/usb.h> | 46 | #include <dev/usb/usb.h> | |
47 | 47 | |||
48 | #include <dev/usb/usbdi.h> | 48 | #include <dev/usb/usbdi.h> | |
49 | #include <dev/usb/usbdi_util.h> | 49 | #include <dev/usb/usbdi_util.h> | |
50 | #include <dev/usb/usbdivar.h> | |||
50 | #include <dev/usb/usbdevs.h> | 51 | #include <dev/usb/usbdevs.h> | |
51 | 52 | |||
52 | #include <dev/usb/ucomvar.h> | 53 | #include <dev/usb/ucomvar.h> | |
53 | 54 | |||
54 | #include <dev/usb/uftdireg.h> | 55 | #include <dev/usb/uftdireg.h> | |
55 | 56 | |||
56 | #ifdef UFTDI_DEBUG | 57 | #ifdef UFTDI_DEBUG | |
57 | #define DPRINTF(x) if (uftdidebug) printf x | 58 | #define DPRINTF(x) if (uftdidebug) printf x | |
58 | #define DPRINTFN(n,x) if (uftdidebug>(n)) printf x | 59 | #define DPRINTFN(n,x) if (uftdidebug>(n)) printf x | |
59 | int uftdidebug = 0; | 60 | int uftdidebug = 0; | |
60 | #else | 61 | #else | |
61 | #define DPRINTF(x) | 62 | #define DPRINTF(x) | |
62 | #define DPRINTFN(n,x) | 63 | #define DPRINTFN(n,x) | |
@@ -174,39 +175,105 @@ static const struct usb_devno uftdi_devs | @@ -174,39 +175,105 @@ static const struct usb_devno uftdi_devs | |||
174 | { USB_VENDOR_MISC, USB_PRODUCT_MISC_TELLSTICK }, | 175 | { USB_VENDOR_MISC, USB_PRODUCT_MISC_TELLSTICK }, | |
175 | { USB_VENDOR_MISC, USB_PRODUCT_MISC_TELLSTICK_DUO }, | 176 | { USB_VENDOR_MISC, USB_PRODUCT_MISC_TELLSTICK_DUO }, | |
176 | }; | 177 | }; | |
177 | #define uftdi_lookup(v, p) usb_lookup(uftdi_devs, v, p) | 178 | #define uftdi_lookup(v, p) usb_lookup(uftdi_devs, v, p) | |
178 | 179 | |||
179 | static int uftdi_match(device_t, cfdata_t, void *); | 180 | static int uftdi_match(device_t, cfdata_t, void *); | |
180 | static void uftdi_attach(device_t, device_t, void *); | 181 | static void uftdi_attach(device_t, device_t, void *); | |
181 | static void uftdi_childdet(device_t, device_t); | 182 | static void uftdi_childdet(device_t, device_t); | |
182 | static int uftdi_detach(device_t, int); | 183 | static int uftdi_detach(device_t, int); | |
183 | 184 | |||
184 | CFATTACH_DECL2_NEW(uftdi, sizeof(struct uftdi_softc), uftdi_match, | 185 | CFATTACH_DECL2_NEW(uftdi, sizeof(struct uftdi_softc), uftdi_match, | |
185 | uftdi_attach, uftdi_detach, NULL, NULL, uftdi_childdet); | 186 | uftdi_attach, uftdi_detach, NULL, NULL, uftdi_childdet); | |
186 | 187 | |||
188 | struct uftdi_match_quirk_entry { | |||
189 | uint16_t vendor_id; | |||
190 | uint16_t product_id; | |||
191 | int iface_no; | |||
192 | const char * vendor_str; | |||
193 | const char * product_str; | |||
194 | int match_ret; | |||
195 | }; | |||
196 | ||||
197 | static const struct uftdi_match_quirk_entry uftdi_match_quirks[] = { | |||
198 | /* | |||
199 | * The Tigard board (https://github.com/tigard-tools/tigard) | |||
200 | * has two interfaces, one of which is meant to act as a | |||
201 | * regular USB serial port (interface 0), the other of which | |||
202 | * is meant for other protocols (SWD, JTAG, etc.). We must | |||
203 | * reject interface 1 so that ugenif matches, thus allowing | |||
204 | * full user-space control of that port. | |||
205 | */ | |||
206 | { | |||
207 | .vendor_id = USB_VENDOR_FTDI, | |||
208 | .product_id = USB_PRODUCT_FTDI_SERIAL_2232C, | |||
209 | .iface_no = 1, | |||
210 | .vendor_str = "SecuringHardware.com", | |||
211 | .product_str = "Tigard V1.1", | |||
212 | .match_ret = UMATCH_NONE, | |||
213 | } | |||
214 | }; | |||
215 | ||||
216 | static int | |||
217 | uftdi_quirk_match(struct usbif_attach_arg *uiaa, int rv) | |||
218 | { | |||
219 | struct usbd_device *dev = uiaa->uiaa_device; | |||
220 | const struct uftdi_match_quirk_entry *q; | |||
221 | int i; | |||
222 | ||||
223 | for (i = 0; i < __arraycount(uftdi_match_quirks); i++) { | |||
224 | q = &uftdi_match_quirks[i]; | |||
225 | if (uiaa->uiaa_vendor != q->vendor_id || | |||
226 | uiaa->uiaa_product != q->product_id || | |||
227 | uiaa->uiaa_ifaceno != q->iface_no) { | |||
228 | continue; | |||
229 | } | |||
230 | if (q->vendor_str != NULL && | |||
231 | (dev->ud_vendor == NULL || | |||
232 | strcmp(dev->ud_vendor, q->vendor_str) != 0)) { | |||
233 | continue; | |||
234 | } | |||
235 | if (q->product_str != NULL && | |||
236 | (dev->ud_product == NULL || | |||
237 | strcmp(dev->ud_product, q->product_str) != 0)) { | |||
238 | continue; | |||
239 | } | |||
240 | /* | |||
241 | * Got a match! | |||
242 | */ | |||
243 | rv = q->match_ret; | |||
244 | break; | |||
245 | } | |||
246 | return rv; | |||
247 | } | |||
248 | ||||
187 | static int | 249 | static int | |
188 | uftdi_match(device_t parent, cfdata_t match, void *aux) | 250 | uftdi_match(device_t parent, cfdata_t match, void *aux) | |
189 | { | 251 | { | |
190 | struct usbif_attach_arg *uiaa = aux; | 252 | struct usbif_attach_arg *uiaa = aux; | |
253 | int rv; | |||
191 | 254 | |||
192 | DPRINTFN(20,("uftdi: vendor=%#x, product=%#x\n", | 255 | DPRINTFN(20,("uftdi: vendor=%#x, product=%#x\n", | |
193 | uiaa->uiaa_vendor, uiaa->uiaa_product)); | 256 | uiaa->uiaa_vendor, uiaa->uiaa_product)); | |
194 | 257 | |||
195 | if (uiaa->uiaa_configno != UFTDI_CONFIG_NO) | 258 | if (uiaa->uiaa_configno != UFTDI_CONFIG_NO) | |
196 | return UMATCH_NONE; | 259 | return UMATCH_NONE; | |
197 | 260 | |||
198 | return uftdi_lookup(uiaa->uiaa_vendor, uiaa->uiaa_product) != NULL ? | 261 | rv = uftdi_lookup(uiaa->uiaa_vendor, uiaa->uiaa_product) != NULL ? | |
199 | UMATCH_VENDOR_PRODUCT_CONF_IFACE : UMATCH_NONE; | 262 | UMATCH_VENDOR_PRODUCT_CONF_IFACE : UMATCH_NONE; | |
263 | if (rv != UMATCH_NONE) { | |||
264 | rv = uftdi_quirk_match(uiaa, rv); | |||
265 | } | |||
266 | return rv; | |||
200 | } | 267 | } | |
201 | 268 | |||
202 | static void | 269 | static void | |
203 | uftdi_attach(device_t parent, device_t self, void *aux) | 270 | uftdi_attach(device_t parent, device_t self, void *aux) | |
204 | { | 271 | { | |
205 | struct uftdi_softc *sc = device_private(self); | 272 | struct uftdi_softc *sc = device_private(self); | |
206 | struct usbif_attach_arg *uiaa = aux; | 273 | struct usbif_attach_arg *uiaa = aux; | |
207 | struct usbd_device *dev = uiaa->uiaa_device; | 274 | struct usbd_device *dev = uiaa->uiaa_device; | |
208 | struct usbd_interface *iface = uiaa->uiaa_iface; | 275 | struct usbd_interface *iface = uiaa->uiaa_iface; | |
209 | usb_device_descriptor_t *ddesc; | 276 | usb_device_descriptor_t *ddesc; | |
210 | usb_interface_descriptor_t *id; | 277 | usb_interface_descriptor_t *id; | |
211 | usb_endpoint_descriptor_t *ed; | 278 | usb_endpoint_descriptor_t *ed; | |
212 | char *devinfop; | 279 | char *devinfop; |
--- src/sys/dev/usb/ugen.c 2022/10/23 11:06:37 1.171
+++ src/sys/dev/usb/ugen.c 2024/04/16 18:45:39 1.171.2.1
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: ugen.c,v 1.171 2022/10/23 11:06:37 riastradh Exp $ */ | 1 | /* $NetBSD: ugen.c,v 1.171.2.1 2024/04/16 18:45:39 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by Lennart Augustsson (lennart@augustsson.net) at | 8 | * by Lennart Augustsson (lennart@augustsson.net) at | |
9 | * Carlstedt Research & Technology. | 9 | * Carlstedt Research & Technology. | |
10 | * | 10 | * | |
11 | * Copyright (c) 2006 BBN Technologies Corp. All rights reserved. | 11 | * Copyright (c) 2006 BBN Technologies Corp. All rights reserved. | |
12 | * Effort sponsored in part by the Defense Advanced Research Projects | 12 | * Effort sponsored in part by the Defense Advanced Research Projects | |
13 | * Agency (DARPA) and the Department of the Interior National Business | 13 | * Agency (DARPA) and the Department of the Interior National Business | |
14 | * Center under agreement number NBCHC050166. | 14 | * Center under agreement number NBCHC050166. | |
@@ -27,27 +27,27 @@ | @@ -27,27 +27,27 @@ | |||
27 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 27 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
28 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 28 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
29 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 29 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
30 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 30 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
31 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 31 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
32 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 32 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
33 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 33 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
34 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 34 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
35 | * POSSIBILITY OF SUCH DAMAGE. | 35 | * POSSIBILITY OF SUCH DAMAGE. | |
36 | */ | 36 | */ | |
37 | 37 | |||
38 | 38 | |||
39 | #include <sys/cdefs.h> | 39 | #include <sys/cdefs.h> | |
40 | __KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.171 2022/10/23 11:06:37 riastradh Exp $"); | 40 | __KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.171.2.1 2024/04/16 18:45:39 martin Exp $"); | |
41 | 41 | |||
42 | #ifdef _KERNEL_OPT | 42 | #ifdef _KERNEL_OPT | |
43 | #include "opt_compat_netbsd.h" | 43 | #include "opt_compat_netbsd.h" | |
44 | #include "opt_usb.h" | 44 | #include "opt_usb.h" | |
45 | #endif | 45 | #endif | |
46 | 46 | |||
47 | #include <sys/param.h> | 47 | #include <sys/param.h> | |
48 | #include <sys/systm.h> | 48 | #include <sys/systm.h> | |
49 | #include <sys/kernel.h> | 49 | #include <sys/kernel.h> | |
50 | #include <sys/kmem.h> | 50 | #include <sys/kmem.h> | |
51 | #include <sys/device.h> | 51 | #include <sys/device.h> | |
52 | #include <sys/ioctl.h> | 52 | #include <sys/ioctl.h> | |
53 | #include <sys/conf.h> | 53 | #include <sys/conf.h> | |
@@ -348,28 +348,32 @@ ugen_match(device_t parent, cfdata_t mat | @@ -348,28 +348,32 @@ ugen_match(device_t parent, cfdata_t mat | |||
348 | override = match->cf_flags & 1; | 348 | override = match->cf_flags & 1; | |
349 | 349 | |||
350 | if (override) | 350 | if (override) | |
351 | return UMATCH_HIGHEST; | 351 | return UMATCH_HIGHEST; | |
352 | else if (uaa->uaa_usegeneric) | 352 | else if (uaa->uaa_usegeneric) | |
353 | return UMATCH_GENERIC; | 353 | return UMATCH_GENERIC; | |
354 | else | 354 | else | |
355 | return UMATCH_NONE; | 355 | return UMATCH_NONE; | |
356 | } | 356 | } | |
357 | 357 | |||
358 | static int | 358 | static int | |
359 | ugenif_match(device_t parent, cfdata_t match, void *aux) | 359 | ugenif_match(device_t parent, cfdata_t match, void *aux) | |
360 | { | 360 | { | |
361 | /* Assume that they knew what they configured! (see ugenif(4)) */ | 361 | /* | |
362 | return UMATCH_HIGHEST; | 362 | * Like ugen(4), ugenif(4) also has an override flag. It has the | |
363 | * opposite effect, however, causing us to match with GENERIC | |||
364 | * priority rather than HIGHEST. | |||
365 | */ | |||
366 | return (match->cf_flags & 1) ? UMATCH_GENERIC : UMATCH_HIGHEST; | |||
363 | } | 367 | } | |
364 | 368 | |||
365 | static void | 369 | static void | |
366 | ugen_attach(device_t parent, device_t self, void *aux) | 370 | ugen_attach(device_t parent, device_t self, void *aux) | |
367 | { | 371 | { | |
368 | struct usb_attach_arg *uaa = aux; | 372 | struct usb_attach_arg *uaa = aux; | |
369 | struct usbif_attach_arg uiaa; | 373 | struct usbif_attach_arg uiaa; | |
370 | 374 | |||
371 | memset(&uiaa, 0, sizeof(uiaa)); | 375 | memset(&uiaa, 0, sizeof(uiaa)); | |
372 | uiaa.uiaa_port = uaa->uaa_port; | 376 | uiaa.uiaa_port = uaa->uaa_port; | |
373 | uiaa.uiaa_vendor = uaa->uaa_vendor; | 377 | uiaa.uiaa_vendor = uaa->uaa_vendor; | |
374 | uiaa.uiaa_product = uaa->uaa_product; | 378 | uiaa.uiaa_product = uaa->uaa_product; | |
375 | uiaa.uiaa_release = uaa->uaa_release; | 379 | uiaa.uiaa_release = uaa->uaa_release; |
--- src/sys/dev/usb/usbdevices.config 2021/06/29 10:22:37 1.42
+++ src/sys/dev/usb/usbdevices.config 2024/04/16 18:45:39 1.42.10.1
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: usbdevices.config,v 1.42 2021/06/29 10:22:37 nia Exp $ | 1 | # $NetBSD: usbdevices.config,v 1.42.10.1 2024/04/16 18:45:39 martin Exp $ | |
2 | # | 2 | # | |
3 | # This file contains all USB related configuration. | 3 | # This file contains all USB related configuration. | |
4 | # It is suitable for inclusion in a kernel config(5) file. | 4 | # It is suitable for inclusion in a kernel config(5) file. | |
5 | # | 5 | # | |
6 | 6 | |||
7 | # USB Controller and Devices | 7 | # USB Controller and Devices | |
8 | 8 | |||
9 | # PCI USB controllers | 9 | # PCI USB controllers | |
10 | #ehci* at pci? dev ? function ? # Enhanced Host Controller | 10 | #ehci* at pci? dev ? function ? # Enhanced Host Controller | |
11 | #ohci* at pci? dev ? function ? # Open Host Controller | 11 | #ohci* at pci? dev ? function ? # Open Host Controller | |
12 | #uhci* at pci? dev ? function ? # Universal Host Controller (Intel) | 12 | #uhci* at pci? dev ? function ? # Universal Host Controller (Intel) | |
13 | 13 | |||
14 | # CardBus USB controllers | 14 | # CardBus USB controllers | |
@@ -249,13 +249,20 @@ aubtfwl* at uhub? port ? # load Atheros | @@ -249,13 +249,20 @@ aubtfwl* at uhub? port ? # load Atheros | |||
249 | bthub* at ubt? | 249 | bthub* at ubt? | |
250 | 250 | |||
251 | # Araneus Alea I/II TRNG | 251 | # Araneus Alea I/II TRNG | |
252 | ualea* at uhub? port ? configuration ? interface ? | 252 | ualea* at uhub? port ? configuration ? interface ? | |
253 | 253 | |||
254 | # Yubikey -- CCID interface (OTP and FIDO are handled by uhidev(4)) | 254 | # Yubikey -- CCID interface (OTP and FIDO are handled by uhidev(4)) | |
255 | # https://support.yubico.com/support/solutions/articles/15000028104-yubikey-usb-id-values | 255 | # https://support.yubico.com/support/solutions/articles/15000028104-yubikey-usb-id-values | |
256 | ugenif* at uhub? vendor 0x1050 product 0x0114 configuration 1 interface 1 | 256 | ugenif* at uhub? vendor 0x1050 product 0x0114 configuration 1 interface 1 | |
257 | ugenif* at uhub? vendor 0x1050 product 0x0115 configuration 1 interface 1 | 257 | ugenif* at uhub? vendor 0x1050 product 0x0115 configuration 1 interface 1 | |
258 | ugenif* at uhub? vendor 0x1050 product 0x0116 configuration 1 interface 2 | 258 | ugenif* at uhub? vendor 0x1050 product 0x0116 configuration 1 interface 2 | |
259 | ugenif* at uhub? vendor 0x1050 product 0x0405 configuration 1 interface 1 | 259 | ugenif* at uhub? vendor 0x1050 product 0x0405 configuration 1 interface 1 | |
260 | ugenif* at uhub? vendor 0x1050 product 0x0406 configuration 1 interface 1 | 260 | ugenif* at uhub? vendor 0x1050 product 0x0406 configuration 1 interface 1 | |
261 | ugenif* at uhub? vendor 0x1050 product 0x0407 configuration 1 interface 2 | 261 | ugenif* at uhub? vendor 0x1050 product 0x0407 configuration 1 interface 2 | |
262 | ||||
263 | # Tigard debug board (FT2232C-based). This line is used in conjunction | |||
264 | # with a match quirk in uftdi.c. The "flags 1" is important; normally | |||
265 | # ugenif matches with higest priority, but we don't want that for all | |||
266 | # FT2232C interfaces, only interfaces that go unclaimed by uftdi (which | |||
267 | # is what the match quirk ensures). | |||
268 | ugenif* at uhub? vendor 0x0403 product 0x6010 configuration 1 interface 1 flags 1 |