Module Name: src
Committed By: martin
Date: Sun Apr 28 13:07:17 UTC 2024
Modified Files:
src/sys/dev/usb [netbsd-10]: uftdi.c
Log Message:
Pull up following revision(s) (requested by thorpej in ticket #676):
sys/dev/usb/uftdi.c: revision 1.79
Add a match quirk to prevent matching any interface on SiPEED FPGA
development boards (e.g. Tang Nano 9K). The FT2232s on these boards
are wired up only for JTAG.
To generate a diff of this commit:
cvs rdiff -u -r1.76.6.1 -r1.76.6.2 src/sys/dev/usb/uftdi.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/usb/uftdi.c
diff -u src/sys/dev/usb/uftdi.c:1.76.6.1 src/sys/dev/usb/uftdi.c:1.76.6.2
--- src/sys/dev/usb/uftdi.c:1.76.6.1 Tue Apr 16 18:45:39 2024
+++ src/sys/dev/usb/uftdi.c Sun Apr 28 13:07:17 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: uftdi.c,v 1.76.6.1 2024/04/16 18:45:39 martin Exp $ */
+/* $NetBSD: uftdi.c,v 1.76.6.2 2024/04/28 13:07:17 martin Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uftdi.c,v 1.76.6.1 2024/04/16 18:45:39 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uftdi.c,v 1.76.6.2 2024/04/28 13:07:17 martin Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -210,7 +210,19 @@ static const struct uftdi_match_quirk_en
.vendor_str = "SecuringHardware.com",
.product_str = "Tigard V1.1",
.match_ret = UMATCH_NONE,
- }
+ },
+ /*
+ * The SiPEED Tang Nano 9K (and other SiPEED Tang FPGA development
+ * boards) have an FT2232 on-board, wired up only for JTAG.
+ */
+ {
+ .vendor_id = USB_VENDOR_FTDI,
+ .product_id = USB_PRODUCT_FTDI_SERIAL_2232C,
+ .iface_no = -1,
+ .vendor_str = "SIPEED",
+ .product_str = "JTAG Debugger",
+ .match_ret = UMATCH_NONE,
+ },
};
static int
@@ -224,7 +236,7 @@ uftdi_quirk_match(struct usbif_attach_ar
q = &uftdi_match_quirks[i];
if (uiaa->uiaa_vendor != q->vendor_id ||
uiaa->uiaa_product != q->product_id ||
- uiaa->uiaa_ifaceno != q->iface_no) {
+ (q->iface_no != -1 && uiaa->uiaa_ifaceno != q->iface_no)) {
continue;
}
if (q->vendor_str != NULL &&