summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorMarc Balmer <mbalmer@cvs.openbsd.org>2008-07-10 13:48:55 +0000
committerMarc Balmer <mbalmer@cvs.openbsd.org>2008-07-10 13:48:55 +0000
commitb8271562e76d5f4318b8953026e3b35202323b1a (patch)
tree89ee342b7927b9087985792644d724bb13e30961 /sys/dev/usb
parent0a51d216c6c78003cce9eaadac600f87ce1ddd18 (diff)
Don't terminate the array of matching product/vendor IDs with { 0, 0 }
when usb_lookup is used. If a device indeed has 0 as vendor and product ID, like the HP DL165 BMC Server Engines SE USB Device, a wrong driver will attach and the machine will most pbly crash. Problem reported Rivo Nurges <rix@estpak.ee> cvs: ----------------------------------------------------------------------
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/ubt.c5
-rw-r--r--sys/dev/usb/udcf.c5
-rw-r--r--sys/dev/usb/uftdi.c5
3 files changed, 6 insertions, 9 deletions
diff --git a/sys/dev/usb/ubt.c b/sys/dev/usb/ubt.c
index 8ee2bbae84a..a929075b84f 100644
--- a/sys/dev/usb/ubt.c
+++ b/sys/dev/usb/ubt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ubt.c,v 1.12 2008/06/26 05:42:18 ray Exp $ */
+/* $OpenBSD: ubt.c,v 1.13 2008/07/10 13:48:54 mbalmer Exp $ */
/* $NetBSD: ubt.c,v 1.30 2007/12/16 19:01:37 christos Exp $ */
/*-
@@ -290,8 +290,7 @@ static void ubt_abortdealloc(struct ubt_softc *);
* to the ubt_ignore list.
*/
static const struct usb_devno ubt_ignore[] = {
- { USB_VENDOR_BROADCOM, USB_PRODUCT_BROADCOM_BCM2033NF },
- { 0, 0 } /* end of list */
+ { USB_VENDOR_BROADCOM, USB_PRODUCT_BROADCOM_BCM2033NF }
};
int
diff --git a/sys/dev/usb/udcf.c b/sys/dev/usb/udcf.c
index 9500b2cd58a..711b18fbaa7 100644
--- a/sys/dev/usb/udcf.c
+++ b/sys/dev/usb/udcf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udcf.c,v 1.43 2008/07/06 10:00:47 mbalmer Exp $ */
+/* $OpenBSD: udcf.c,v 1.44 2008/07/10 13:48:54 mbalmer Exp $ */
/*
* Copyright (c) 2006, 2007, 2008 Marc Balmer <mbalmer@openbsd.org>
@@ -160,8 +160,7 @@ const struct cfattach udcf_ca = {
static const struct usb_devno udcf_devs[] = {
{ USB_VENDOR_GUDE, USB_PRODUCT_GUDE_DCF },
{ USB_VENDOR_FTDI, USB_PRODUCT_FTDI_DCF },
- { USB_VENDOR_FTDI, USB_PRODUCT_FTDI_HBG },
- { 0, 0 }
+ { USB_VENDOR_FTDI, USB_PRODUCT_FTDI_HBG }
};
int
diff --git a/sys/dev/usb/uftdi.c b/sys/dev/usb/uftdi.c
index 069f78a4a6d..e963695f642 100644
--- a/sys/dev/usb/uftdi.c
+++ b/sys/dev/usb/uftdi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uftdi.c,v 1.49 2008/06/26 05:42:18 ray Exp $ */
+/* $OpenBSD: uftdi.c,v 1.50 2008/07/10 13:48:54 mbalmer Exp $ */
/* $NetBSD: uftdi.c,v 1.14 2003/02/23 04:20:07 simonb Exp $ */
/*
@@ -398,8 +398,7 @@ static const struct usb_devno uftdi_devs[] = {
{ USB_VENDOR_TESTO, USB_PRODUCT_TESTO_SERIAL_1 },
{ USB_VENDOR_TESTO, USB_PRODUCT_TESTO_SERIAL_2 },
{ USB_VENDOR_TESTO, USB_PRODUCT_TESTO_SERVICE },
- { USB_VENDOR_THURLBY, USB_PRODUCT_THURLBY_QL355P },
- { 0, 0 }
+ { USB_VENDOR_THURLBY, USB_PRODUCT_THURLBY_QL355P }
};
int