From f2b2cfdac0f47020123b27610eb2b23e477fc580 Mon Sep 17 00:00:00 2001 From: Ian Dowse Date: Thu, 10 Jun 2004 01:13:26 +0000 Subject: [PATCH] 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 | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c index e0d8ada0927..e30218315bb 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? */