From 042f1ac33fd7a67c54260fac4098aeeefa4b46f0 Mon Sep 17 00:00:00 2001 From: Peter Valchev Date: Thu, 10 Jun 2004 17:31:16 +0000 Subject: 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 --- sys/dev/usb/uhub.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys') 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? */ -- cgit v1.2.3