Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Ensure that it is UPS_PORT_ENABLED before checki...
details: https://anonhg.NetBSD.org/src/rev/0c2c9741f8f8
branches: trunk
changeset: 757626:0c2c9741f8f8
user: kiyohara <kiyohara%NetBSD.org@localhost>
date: Wed Sep 08 14:01:58 2010 +0000
description:
Ensure that it is UPS_PORT_ENABLED before checking the speed of the device.
diffstat:
sys/dev/usb/uhub.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diffs (33 lines):
diff -r 6baf7bdcc34c -r 0c2c9741f8f8 sys/dev/usb/uhub.c
--- a/sys/dev/usb/uhub.c Wed Sep 08 13:58:46 2010 +0000
+++ b/sys/dev/usb/uhub.c Wed Sep 08 14:01:58 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uhub.c,v 1.109 2010/02/02 23:18:49 pooka Exp $ */
+/* $NetBSD: uhub.c,v 1.110 2010/09/08 14:01:58 kiyohara Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $ */
/*
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.109 2010/02/02 23:18:49 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.110 2010/09/08 14:01:58 kiyohara Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -525,6 +525,14 @@
#endif
continue;
}
+ if (!(status & UPS_PORT_ENABLED)) {
+ /* Not allowed send/receive packet. */
+#ifdef DIAGNOSTIC
+ printf("%s: port %d, device not enable\n",
+ USBDEVNAME(sc->sc_dev), port);
+#endif
+ continue;
+ }
/* Figure out device speed */
if (status & UPS_HIGH_SPEED)
Home |
Main Index |
Thread Index |
Old Index