summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2007-04-26 17:00:29 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2007-04-26 17:00:29 +0000
commitb70ce41c22de7e2281a07553ebb61643145ed28a (patch)
treef2692c2cfe78abcaa8479c0abca876ca3073a3ce /sys/dev/usb
parente74be22fa284be519fe4f94e07adf0e0ee2395cd (diff)
USB device lists do not need a terminating sentinel, so don't provide any;
this should prevent phantom devices from attaching axe or uberry on some machines. ok deraadt@
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/if_axe.c5
-rw-r--r--sys/dev/usb/if_ubt.c17
-rw-r--r--sys/dev/usb/uberry.c5
-rw-r--r--sys/dev/usb/uts.c5
4 files changed, 16 insertions, 16 deletions
diff --git a/sys/dev/usb/if_axe.c b/sys/dev/usb/if_axe.c
index 56999dffb6e..03f5d77327e 100644
--- a/sys/dev/usb/if_axe.c
+++ b/sys/dev/usb/if_axe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_axe.c,v 1.63 2007/04/09 08:57:51 jsg Exp $ */
+/* $OpenBSD: if_axe.c,v 1.64 2007/04/26 17:00:28 miod Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Jonathan Gray <jsg@openbsd.org>
@@ -168,8 +168,7 @@ Static const struct axe_type axe_devs[] = {
{ { USB_VENDOR_PLANEX3, USB_PRODUCT_PLANEX3_GU1000T }, AX178 },
{ { USB_VENDOR_SYSTEMTALKS, USB_PRODUCT_SYSTEMTALKS_SGCX2UL}, 0 },
{ { USB_VENDOR_SITECOM, USB_PRODUCT_SITECOM_LN029}, 0 },
- { { USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_LN028 }, AX178 },
- { { 0, 0}, 0 }
+ { { USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_LN028 }, AX178 }
};
#define axe_lookup(v, p) ((struct axe_type *)usb_lookup(axe_devs, v, p))
diff --git a/sys/dev/usb/if_ubt.c b/sys/dev/usb/if_ubt.c
index 92c15eddbff..a41eac0026f 100644
--- a/sys/dev/usb/if_ubt.c
+++ b/sys/dev/usb/if_ubt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ubt.c,v 1.6 2005/11/24 14:31:40 grange Exp $ */
+/* $OpenBSD: if_ubt.c,v 1.7 2007/04/26 17:00:28 miod Exp $ */
/*
* ng_ubt.c
@@ -27,7 +27,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_ubt.c,v 1.6 2005/11/24 14:31:40 grange Exp $
+ * $Id: if_ubt.c,v 1.7 2007/04/26 17:00:28 miod Exp $
* $FreeBSD: src/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c,v 1.20 2004/10/12 23:33:46 emax Exp $
*/
@@ -102,6 +102,7 @@ Static void ubt_if_watchdog(struct ifnet *);
USB_MATCH(ubt)
{
+#ifdef notyet
/*
* If for some reason device should not be attached then put
* VendorID/ProductID pair into the list below. Currently I
@@ -113,8 +114,8 @@ USB_MATCH(ubt)
*/
Static struct usb_devno const ubt_ignored_devices[] = {
- { 0, 0 } /* This should be the last item in the list */
};
+#endif
/*
* If device violates Bluetooth specification and has bDeviceClass,
@@ -124,17 +125,19 @@ USB_MATCH(ubt)
Static struct usb_devno const ubt_broken_devices[] = {
{ USB_VENDOR_CSR, USB_PRODUCT_CSR_BLUECORE },
- { USB_VENDOR_MSI, USB_PRODUCT_MSI_BLUETOOTH },
- { 0, 0 } /* This should be the last item in the list */
+ { USB_VENDOR_MSI, USB_PRODUCT_MSI_BLUETOOTH }
};
USB_MATCH_START(ubt, uaa);
usb_device_descriptor_t *dd = usbd_get_device_descriptor(uaa->device);
- if (uaa->iface == NULL ||
- usb_lookup(ubt_ignored_devices, uaa->vendor, uaa->product))
+ if (uaa->iface == NULL)
+ return (UMATCH_NONE);
+#ifdef notyet
+ if (usb_lookup(ubt_ignored_devices, uaa->vendor, uaa->product))
return (UMATCH_NONE);
+#endif
if (dd->bDeviceClass == UDCLASS_WIRELESS &&
dd->bDeviceSubClass == UDSUBCLASS_RF &&
diff --git a/sys/dev/usb/uberry.c b/sys/dev/usb/uberry.c
index fe632c24a9f..df155a3fe61 100644
--- a/sys/dev/usb/uberry.c
+++ b/sys/dev/usb/uberry.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uberry.c,v 1.2 2006/11/29 19:55:37 miod Exp $ */
+/* $OpenBSD: uberry.c,v 1.3 2007/04/26 17:00:28 miod Exp $ */
/*-
* Copyright (c) 2006 Theo de Raadt <deraadt@openbsd.org>
@@ -46,8 +46,7 @@ struct uberry_softc {
#define UBERRY_CONFIG_NO 0
Static struct usb_devno const uberry_devices[] = {
- { USB_VENDOR_RIM, USB_PRODUCT_RIM_BLACKBERRY },
- { 0, 0 }
+ { USB_VENDOR_RIM, USB_PRODUCT_RIM_BLACKBERRY }
};
USB_DECLARE_DRIVER(uberry);
diff --git a/sys/dev/usb/uts.c b/sys/dev/usb/uts.c
index fc933bd9bea..ce8408c14df 100644
--- a/sys/dev/usb/uts.c
+++ b/sys/dev/usb/uts.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uts.c,v 1.4 2007/04/25 14:17:42 robert Exp $ */
+/* $OpenBSD: uts.c,v 1.5 2007/04/26 17:00:28 miod Exp $ */
/*
* Copyright (c) 2007 Robert Nagy <robert@openbsd.org>
@@ -97,8 +97,7 @@ struct uts_pos {
Static const struct usb_devno uts_devs[] = {
{ USB_VENDOR_FTDI, USB_PRODUCT_FTDI_ITM_TOUCH },
{ USB_VENDOR_EGALAX, USB_PRODUCT_EGALAX_TPANEL },
- { USB_VENDOR_EGALAX, USB_PRODUCT_EGALAX_TPANEL2 },
- { 0, 0 }
+ { USB_VENDOR_EGALAX, USB_PRODUCT_EGALAX_TPANEL2 }
};
Static void uts_intr(usbd_xfer_handle, usbd_private_handle, usbd_status);