Module Name: src
Committed By: kiyohara
Date: Wed Sep 8 14:01:58 UTC 2010
Modified Files:
src/sys/dev/usb: uhub.c
Log Message:
Ensure that it is UPS_PORT_ENABLED before checking the speed of the device.
To generate a diff of this commit:
cvs rdiff -u -r1.109 -r1.110 src/sys/dev/usb/uhub.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/uhub.c
diff -u src/sys/dev/usb/uhub.c:1.109 src/sys/dev/usb/uhub.c:1.110
--- src/sys/dev/usb/uhub.c:1.109 Tue Feb 2 23:18:49 2010
+++ src/sys/dev/usb/uhub.c Wed Sep 8 14:01:58 2010
@@ -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)