summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/uhub.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/usb/uhub.c')
-rw-r--r--sys/dev/usb/uhub.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c
index 8234ba1..5f7d510 100644
--- a/sys/dev/usb/uhub.c
+++ b/sys/dev/usb/uhub.c
@@ -1,4 +1,4 @@
-/* $NetBSD: uhub.c,v 1.52 2001/10/26 17:53:59 augustss Exp $ */
+/* $NetBSD: uhub.c,v 1.54 2001/11/16 01:57:47 augustss Exp $ */
/* $FreeBSD$ */
/*
@@ -443,6 +443,23 @@ uhub_explore(usbd_device_handle dev)
port);
continue;
}
+ /* Get port status again, it might have changed during reset */
+ err = usbd_get_port_status(dev, port, &up->status);
+ if (err) {
+ DPRINTF(("uhub_explore: get port status failed, "
+ "error=%s\n", usbd_errstr(err)));
+ continue;
+ }
+ status = UGETW(up->status.wPortStatus);
+ change = UGETW(up->status.wPortChange);
+ if (!(status & UPS_CURRENT_CONNECT_STATUS)) {
+ /* Nothing connected, just ignore it. */
+#ifdef DIAGNOSTIC
+ printf("%s: device disappeared on port %d\n",
+ USBDEVNAME(sc->sc_dev), port);
+#endif
+ continue;
+ }
/* Figure out device speed */
if (status & UPS_HIGH_SPEED)
OpenPOWER on IntegriCloud