aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/ehci-pci.c')
-rw-r--r--drivers/usb/host/ehci-pci.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c
index ead5f4f2aa5a..d43d176161aa 100644
--- a/drivers/usb/host/ehci-pci.c
+++ b/drivers/usb/host/ehci-pci.c
@@ -109,6 +109,9 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
109 return retval; 109 return retval;
110 110
111 switch (pdev->vendor) { 111 switch (pdev->vendor) {
112 case PCI_VENDOR_ID_NEC:
113 ehci->need_io_watchdog = 0;
114 break;
112 case PCI_VENDOR_ID_INTEL: 115 case PCI_VENDOR_ID_INTEL:
113 ehci->need_io_watchdog = 0; 116 ehci->need_io_watchdog = 0;
114 if (pdev->device == 0x27cc) { 117 if (pdev->device == 0x27cc) {
@@ -284,23 +287,15 @@ static int ehci_pci_suspend(struct usb_hcd *hcd)
284 msleep(10); 287 msleep(10);
285 288
286 /* Root hub was already suspended. Disable irq emission and 289 /* Root hub was already suspended. Disable irq emission and
287 * mark HW unaccessible, bail out if RH has been resumed. Use 290 * mark HW unaccessible. The PM and USB cores make sure that
288 * the spinlock to properly synchronize with possible pending 291 * the root hub is either suspended or stopped.
289 * RH suspend or resume activity.
290 *
291 * This is still racy as hcd->state is manipulated outside of
292 * any locks =P But that will be a different fix.
293 */ 292 */
294 spin_lock_irqsave (&ehci->lock, flags); 293 spin_lock_irqsave (&ehci->lock, flags);
295 if (hcd->state != HC_STATE_SUSPENDED) { 294 ehci_prepare_ports_for_controller_suspend(ehci);
296 rc = -EINVAL;
297 goto bail;
298 }
299 ehci_writel(ehci, 0, &ehci->regs->intr_enable); 295 ehci_writel(ehci, 0, &ehci->regs->intr_enable);
300 (void)ehci_readl(ehci, &ehci->regs->intr_enable); 296 (void)ehci_readl(ehci, &ehci->regs->intr_enable);
301 297
302 clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); 298 clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
303 bail:
304 spin_unlock_irqrestore (&ehci->lock, flags); 299 spin_unlock_irqrestore (&ehci->lock, flags);
305 300
306 // could save FLADJ in case of Vaux power loss 301 // could save FLADJ in case of Vaux power loss
@@ -330,6 +325,7 @@ static int ehci_pci_resume(struct usb_hcd *hcd, bool hibernated)
330 !hibernated) { 325 !hibernated) {
331 int mask = INTR_MASK; 326 int mask = INTR_MASK;
332 327
328 ehci_prepare_ports_for_controller_resume(ehci);
333 if (!hcd->self.root_hub->do_remote_wakeup) 329 if (!hcd->self.root_hub->do_remote_wakeup)
334 mask &= ~STS_PCD; 330 mask &= ~STS_PCD;
335 ehci_writel(ehci, mask, &ehci->regs->intr_enable); 331 ehci_writel(ehci, mask, &ehci->regs->intr_enable);