summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2004-06-10 01:13:26 +0000
committeriedowse <iedowse@FreeBSD.org>2004-06-10 01:13:26 +0000
commit3c14651a47e9eda900d09f983be6a3c4099e88c6 (patch)
tree982a72a234aa6895131b405bff64d240f5569a96 /sys
parenta8a74bf84ea6841e22f60c59f26166f4f9d1470e (diff)
downloadFreeBSD-src-3c14651a47e9eda900d09f983be6a3c4099e88c6.zip
FreeBSD-src-3c14651a47e9eda900d09f983be6a3c4099e88c6.tar.gz
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')
-rw-r--r--sys/dev/usb/uhub.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c
index e0d8ada..e302183 100644
--- a/sys/dev/usb/uhub.c
+++ b/sys/dev/usb/uhub.c
@@ -308,6 +308,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? */
OpenPOWER on IntegriCloud