]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/host/ehci-pci.c
USB: fix up suspend and resume for PCI host controllers
[linux-2.6-omap-h63xx.git] / drivers / usb / host / ehci-pci.c
index 9d0ea573aef60c3e45afb3dec145c5f0f4ed843b..6af47a0937b85659bab53cb156978d93bd857ca0 100644 (file)
@@ -169,18 +169,21 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
                }
                break;
        case PCI_VENDOR_ID_ATI:
-               /* SB700 old version has a bug in EHCI controller,
+               /* SB600 and old version of SB700 have a bug in EHCI controller,
                 * which causes usb devices lose response in some cases.
                 */
-               if (pdev->device == 0x4396) {
+               if ((pdev->device == 0x4386) || (pdev->device == 0x4396)) {
                        p_smbus = pci_get_device(PCI_VENDOR_ID_ATI,
                                                 PCI_DEVICE_ID_ATI_SBX00_SMBUS,
                                                 NULL);
                        if (!p_smbus)
                                break;
                        rev = p_smbus->revision;
-                       if ((rev == 0x3a) || (rev == 0x3b)) {
+                       if ((pdev->device == 0x4386) || (rev == 0x3a)
+                           || (rev == 0x3b)) {
                                u8 tmp;
+                               ehci_info(ehci, "applying AMD SB600/SB700 USB "
+                                       "freeze workaround\n");
                                pci_read_config_byte(pdev, 0x53, &tmp);
                                pci_write_config_byte(pdev, 0x53, tmp | (1<<3));
                        }
@@ -425,6 +428,8 @@ static struct pci_driver ehci_pci_driver = {
 
 #ifdef CONFIG_PM
        .suspend =      usb_hcd_pci_suspend,
+       .suspend_late = usb_hcd_pci_suspend_late,
+       .resume_early = usb_hcd_pci_resume_early,
        .resume =       usb_hcd_pci_resume,
 #endif
        .shutdown =     usb_hcd_pci_shutdown,