]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/host/ehci-pci.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[linux-2.6-omap-h63xx.git] / drivers / usb / host / ehci-pci.c
index 12edc723ec73e41261be2eb1bf25aee451fc1a92..3ba01664f82154b00bef518eea7c3e809566f63b 100644 (file)
@@ -58,8 +58,6 @@ static int ehci_pci_reinit(struct ehci_hcd *ehci, struct pci_dev *pdev)
        if (!retval)
                ehci_dbg(ehci, "MWI active\n");
 
-       ehci_port_power(ehci, 0);
-
        return 0;
 }
 
@@ -149,16 +147,14 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
                 * fixed in newer silicon.
                 */
                case 0x0068:
-                       pci_read_config_dword(pdev, PCI_REVISION_ID, &temp);
-                       if ((temp & 0xff) < 0xa4)
+                       if (pdev->revision < 0xa4)
                                ehci->no_selective_suspend = 1;
                        break;
                }
                break;
        }
 
-       if (ehci_is_TDI(ehci))
-               ehci_reset(ehci);
+       ehci_reset(ehci);
 
        /* at least the Genesys GL880S needs fixup here */
        temp = HCS_N_CC(ehci->hcs_params) * HCS_N_PCC(ehci->hcs_params);
@@ -309,17 +305,18 @@ static int ehci_pci_resume(struct usb_hcd *hcd)
        /* emptying the schedule aborts any urbs */
        spin_lock_irq(&ehci->lock);
        if (ehci->reclaim)
-               ehci->reclaim_ready = 1;
+               end_unlink_async(ehci);
        ehci_work(ehci);
        spin_unlock_irq(&ehci->lock);
 
-       /* here we "know" root ports should always stay powered */
-       ehci_port_power(ehci, 1);
-
        ehci_writel(ehci, ehci->command, &ehci->regs->command);
        ehci_writel(ehci, FLAG_CF, &ehci->regs->configured_flag);
        ehci_readl(ehci, &ehci->regs->command); /* unblock posted writes */
 
+       /* here we "know" root ports should always stay powered */
+       ehci_port_power(ehci, 1);
+       ehci_handover_companion_ports(ehci);
+
        hcd->state = HC_STATE_SUSPENDED;
        return 0;
 }
@@ -367,6 +364,7 @@ static const struct hc_driver ehci_pci_hc_driver = {
        .hub_control =          ehci_hub_control,
        .bus_suspend =          ehci_bus_suspend,
        .bus_resume =           ehci_bus_resume,
+       .relinquish_port =      ehci_relinquish_port,
 };
 
 /*-------------------------------------------------------------------------*/