summaryrefslogtreecommitdiff
path: root/sys/dev/usb/uhub.c
diff options
context:
space:
mode:
authorJosef Karthauser <joe@FreeBSD.org>2002-04-07 10:57:42 +0000
committerJosef Karthauser <joe@FreeBSD.org>2002-04-07 10:57:42 +0000
commitbcfc7cc13669d4ade2e1bded4d841918aa3d1a7c (patch)
tree44a882861d82317c9f791fb37e223432f3789aa3 /sys/dev/usb/uhub.c
parent6b0ff5f596e5cabfbacb0f59e193232cbd6c7322 (diff)
Notes
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 8234ba16f21e..5f7d51091534 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)