X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fusb%2Fhost%2Fohci-hub.c;h=e2fc4129dfc6e0f3684d3d5aee438ca4a0e85640;hb=f7f1b0f1e2fbadeab12d24236000e778aa9b1ead;hp=1c296c3adcbae6e0e5b45f42ead56ab8cc402df7;hpb=e3f6fb6212a7102bdb56ba38fa1e98fe72950475;p=linux-2.6.git diff --git a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c index 1c296c3ad..e2fc4129d 100644 --- a/drivers/usb/host/ohci-hub.c +++ b/drivers/usb/host/ohci-hub.c @@ -73,7 +73,7 @@ static int ohci_hub_suspend (struct usb_hcd *hcd) 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; @@ -119,7 +119,7 @@ static int ohci_hub_suspend (struct usb_hcd *hcd) done: if (status == 0) - hcd->state = HCD_STATE_SUSPENDED; + hcd->state = HC_STATE_SUSPENDED; spin_unlock_irqrestore (&ohci->lock, flags); return status; } @@ -147,7 +147,7 @@ static int ohci_hub_resume (struct usb_hcd *hcd) 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; @@ -169,7 +169,7 @@ static int ohci_hub_resume (struct usb_hcd *hcd) 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 */ @@ -197,8 +197,8 @@ static int ohci_hub_resume (struct usb_hcd *hcd) &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); @@ -216,6 +216,7 @@ static int ohci_hub_resume (struct usb_hcd *hcd) 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 */ @@ -272,7 +273,7 @@ static int ohci_hub_resume (struct usb_hcd *hcd) (void) ohci_readl (ohci, &ohci->regs->control); } - hcd->state = USB_STATE_RUNNING; + hcd->state = HC_STATE_RUNNING; return 0; } @@ -313,7 +314,7 @@ ohci_hub_status_data (struct usb_hcd *hcd, char *buf) * 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; } @@ -378,7 +379,7 @@ 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