summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/uhub.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2004-07-11 05:32:38 +0000
committerderaadt <deraadt@openbsd.org>2004-07-11 05:32:38 +0000
commit0964fbcce032b153aae054f1b8e0b154bf3f0298 (patch)
treecba1f7254ed095076f0d4b053c82edc09754e11f /sys/dev/usb/uhub.c
parentfrom netbsd via loki@animata.net (diff)
downloadwireguard-openbsd-0964fbcce032b153aae054f1b8e0b154bf3f0298.tar.xz
wireguard-openbsd-0964fbcce032b153aae054f1b8e0b154bf3f0298.zip
from netbsd via loki@animata.net, revision 1.68
Ignore a port error that happens to come in at the same time as a connect status change. Some root hubs seem to report both.
Diffstat (limited to 'sys/dev/usb/uhub.c')
-rw-r--r--sys/dev/usb/uhub.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c
index 21d2c47173a..f7e0b5bc69b 100644
--- a/sys/dev/usb/uhub.c
+++ b/sys/dev/usb/uhub.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhub.c,v 1.25 2004/07/11 05:29:16 deraadt Exp $ */
+/* $OpenBSD: uhub.c,v 1.26 2004/07/11 05:32:38 deraadt Exp $ */
/* $NetBSD: uhub.c,v 1.64 2003/02/08 03:32:51 ichiro Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $ */
@@ -358,7 +358,10 @@ uhub_explore(usbd_device_handle dev)
if (change & UPS_C_PORT_ENABLED) {
DPRINTF(("uhub_explore: C_PORT_ENABLED\n"));
usbd_clear_port_feature(dev, port, UHF_C_PORT_ENABLE);
- if (status & UPS_PORT_ENABLED) {
+ if (change & UPS_C_CONNECT_STATUS) {
+ /* Ignore the port error if the device
+ vanished. */
+ } else if (status & UPS_PORT_ENABLED) {
printf("%s: illegal enable change, port %d\n",
USBDEVNAME(sc->sc_dev), port);
} else {