summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/uhub.c
diff options
context:
space:
mode:
authorpvalchev <pvalchev@openbsd.org>2004-06-10 17:31:15 +0000
committerpvalchev <pvalchev@openbsd.org>2004-06-10 17:31:15 +0000
commit0e7aac92bd40bbcd791771818f103766db72bed5 (patch)
treece1981e8fdd59a89c30bd97dc63d2da005fe3db7 /sys/dev/usb/uhub.c
parentzero the cif struct correctly. (diff)
downloadwireguard-openbsd-0e7aac92bd40bbcd791771818f103766db72bed5.tar.xz
wireguard-openbsd-0e7aac92bd40bbcd791771818f103766db72bed5.zip
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? */