Need to initialize timers a bit earlier to handle certain initialization faults.
Please merge.
- Dave
OSDL bug 2006
Need to initialize some timers a bit earlier to clean up safely
after very early init HCD failures.
Those early init faults were needlessly mysterious since they
didn't emit diagnostics except at HCD discretion.
--- 1.24/drivers/usb/core/hcd-pci.c Wed Feb 11 03:42:39 2004
+++ edited/drivers/usb/core/hcd-pci.c Wed Feb 25 08:51:00 2004
@@ -189,13 +189,16 @@
hcd->self.op = &usb_hcd_operations;
hcd->self.hcpriv = (void *) hcd;
hcd->self.release = &hcd_pci_release;
+ init_timer (&hcd->rh_timer);
INIT_LIST_HEAD (&hcd->dev_list);
usb_register_bus (&hcd->self);
- if ((retval = driver->start (hcd)) < 0)
+ if ((retval = driver->start (hcd)) < 0) {
+ dev_err (hcd->self.controller, "init error %d\n", retval);
usb_hcd_pci_remove (dev);
+ }
return retval;
}
--- 1.69/drivers/usb/host/ehci-hcd.c Fri Feb 20 11:20:07 2004
+++ edited/drivers/usb/host/ehci-hcd.c Wed Feb 25 09:04:11 2004
@@ -374,6 +374,10 @@
u32 hcc_params;
u8 tempbyte;
+ init_timer (&ehci->watchdog);
+ ehci->watchdog.function = ehci_watchdog;
+ ehci->watchdog.data = (unsigned long) ehci;
+
/*
* hw default: 1K periodic list heads, one per frame.
* periodic_size can shrink by USBCMD update if hcc_params allows.
@@ -467,10 +471,6 @@
dbg_cmd (ehci, "init", temp);
/* set async sleep time = 10 us ... ? */
-
- init_timer (&ehci->watchdog);
- ehci->watchdog.function = ehci_watchdog;
- ehci->watchdog.data = (unsigned long) ehci;
/* wire up the root hub */
bus = hcd_to_bus (hcd);
