summaryrefslogtreecommitdiff
path: root/sys/dev/usb/uhub.c
diff options
context:
space:
mode:
authorPeter Valchev <pvalchev@cvs.openbsd.org>2004-06-10 17:31:16 +0000
committerPeter Valchev <pvalchev@cvs.openbsd.org>2004-06-10 17:31:16 +0000
commit042f1ac33fd7a67c54260fac4098aeeefa4b46f0 (patch)
tree84c387d1849a2c106292f3b0275d8bc269ec6c25 /sys/dev/usb/uhub.c
parentbced7b8253d782109657658d9e64426440dca9d3 (diff)
From FreeBSD (via rees@umich.edu and nate)
Initialise `restartcnt' in the newly malloc'd usbd_port structure, as otherwise the junk it contains may cause uhub_explore to give up without ever trying to restart the port. This fixes the following errors I was seeing with a VIA UHCI controller: uhub0: port error, restarting port 1 uhub0: port error, giving up port 1
Diffstat (limited to 'sys/dev/usb/uhub.c')
-rw-r--r--sys/dev/usb/uhub.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c
index 626bd0d62f7..68fd843a3a1 100644
--- a/sys/dev/usb/uhub.c
+++ b/sys/dev/usb/uhub.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhub.c,v 1.21 2003/07/08 13:19:09 nate Exp $ */
+/* $OpenBSD: uhub.c,v 1.22 2004/06/10 17:31:15 pvalchev 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 $ */
@@ -292,6 +292,7 @@ USB_ATTACH(uhub)
up->power = USB_MAX_POWER;
else
up->power = USB_MIN_POWER;
+ up->restartcnt = 0;
}
/* XXX should check for none, individual, or ganged power? */