Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Allow USB_DEVICEINFO on address 0. Needed for t...
details: https://anonhg.NetBSD.org/src/rev/61cc0956e597
branches: trunk
changeset: 789986:61cc0956e597
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Sat Sep 14 14:06:40 2013 +0000
description:
Allow USB_DEVICEINFO on address 0. Needed for the xhci(4) root hub device.
diffstat:
sys/dev/usb/usb.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 2a1b08eb239a -r 61cc0956e597 sys/dev/usb/usb.c
--- a/sys/dev/usb/usb.c Sat Sep 14 13:46:52 2013 +0000
+++ b/sys/dev/usb/usb.c Sat Sep 14 14:06:40 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: usb.c,v 1.143 2013/09/13 23:42:12 jakllsch Exp $ */
+/* $NetBSD: usb.c,v 1.144 2013/09/14 14:06:40 jakllsch Exp $ */
/*
* Copyright (c) 1998, 2002, 2008, 2012 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.143 2013/09/13 23:42:12 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.144 2013/09/14 14:06:40 jakllsch Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -707,7 +707,7 @@
struct usb_device_info *di = (void *)data;
int addr = di->udi_addr;
- if (addr < 1 || addr >= USB_MAX_DEVICES)
+ if (addr < 0 || addr >= USB_MAX_DEVICES)
return EINVAL;
if ((dev = sc->sc_bus->devices[addr]) == NULL)
return ENXIO;
Home |
Main Index |
Thread Index |
Old Index