ohci_dbg (ohci, "suspend root hub\n");
/* First stop any processing */
- hcd->state = USB_STATE_QUIESCING;
+ hcd->state = HC_STATE_QUIESCING;
if (ohci->hc_control & OHCI_SCHED_ENABLES) {
int limit;
done:
if (status == 0)
- hcd->state = HCD_STATE_SUSPENDED;
+ hcd->state = HC_STATE_SUSPENDED;
spin_unlock_irqrestore (&ohci->lock, flags);
return status;
}
if (ohci->hc_control & (OHCI_CTRL_IR | OHCI_SCHED_ENABLES)) {
/* this can happen after suspend-to-disk */
- if (hcd->state == USB_STATE_RESUMING) {
+ if (hcd->state == HC_STATE_RESUMING) {
ohci_dbg (ohci, "BIOS/SMM active, control %03x\n",
ohci->hc_control);
status = -EBUSY;
ohci_info (ohci, "wakeup\n");
break;
case OHCI_USB_OPER:
- ohci_dbg (ohci, "odd resume\n");
+ ohci_dbg (ohci, "already resumed\n");
status = 0;
break;
default: /* RESET, we lost power */
&ohci->regs->roothub.portstatus [temp]);
}
- /* Some controllers (lucent) need extra-long delays */
- hcd->state = USB_STATE_RESUMING;
+ /* Some controllers (lucent erratum) need extra-long delays */
+ hcd->state = HC_STATE_RESUMING;
mdelay (20 /* usb 11.5.1.10 */ + 15);
temp = ohci_readl (ohci, &ohci->regs->control);
ohci_writel (ohci, 0, &ohci->regs->ed_periodcurrent);
ohci_writel (ohci, (u32) ohci->hcca_dma, &ohci->regs->hcca);
+ /* Sometimes PCI D3 suspend trashes frame timings ... */
periodic_reinit (ohci);
/* interrupts might have been disabled */
(void) ohci_readl (ohci, &ohci->regs->control);
}
- hcd->state = USB_STATE_RUNNING;
+ hcd->state = HC_STATE_RUNNING;
return 0;
}
* letting khubd or root hub timer see state changes.
*/
if ((ohci->hc_control & OHCI_CTRL_HCFS) != OHCI_USB_OPER
- || !HCD_IS_RUNNING(hcd->state)) {
+ || !HC_IS_RUNNING(hcd->state)) {
can_suspend = 0;
goto done;
}
) {
ohci_vdbg (ohci, "autosuspend\n");
(void) ohci_hub_suspend (hcd);
- hcd->state = USB_STATE_RUNNING;
+ hcd->state = HC_STATE_RUNNING;
usb_unlock_device (hcd->self.root_hub);
}
#endif