diff options
author | Alex He <alex.he@amd.com> | 2010-12-21 04:45:46 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-01-22 21:32:54 -0500 |
commit | baab93afc2844b68d57b0dcca5e1d34c5d7cf411 (patch) | |
tree | eb97c38afa1039de058b2b1828a97bf5cd74a3f3 /drivers | |
parent | 1e4cba8bd2cddd10849e769ff502e255c27c81b4 (diff) |
USB: EHCI: ASPM quirk of ISOC on AMD Hudson
AMD Hudson also needs the same ASPM quirk as SB800
Signed-off-by: Alex He <alex.he@amd.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/host/ehci-pci.c | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c index 76179c39c0e3..bed07d4aab06 100644 --- a/drivers/usb/host/ehci-pci.c +++ b/drivers/usb/host/ehci-pci.c | |||
@@ -44,28 +44,35 @@ static int ehci_pci_reinit(struct ehci_hcd *ehci, struct pci_dev *pdev) | |||
44 | return 0; | 44 | return 0; |
45 | } | 45 | } |
46 | 46 | ||
47 | static int ehci_quirk_amd_SB800(struct ehci_hcd *ehci) | 47 | static int ehci_quirk_amd_hudson(struct ehci_hcd *ehci) |
48 | { | 48 | { |
49 | struct pci_dev *amd_smbus_dev; | 49 | struct pci_dev *amd_smbus_dev; |
50 | u8 rev = 0; | 50 | u8 rev = 0; |
51 | 51 | ||
52 | amd_smbus_dev = pci_get_device(PCI_VENDOR_ID_ATI, 0x4385, NULL); | 52 | amd_smbus_dev = pci_get_device(PCI_VENDOR_ID_ATI, 0x4385, NULL); |
53 | if (!amd_smbus_dev) | 53 | if (amd_smbus_dev) { |
54 | return 0; | 54 | pci_read_config_byte(amd_smbus_dev, PCI_REVISION_ID, &rev); |
55 | 55 | if (rev < 0x40) { | |
56 | pci_read_config_byte(amd_smbus_dev, PCI_REVISION_ID, &rev); | 56 | pci_dev_put(amd_smbus_dev); |
57 | if (rev < 0x40) { | 57 | amd_smbus_dev = NULL; |
58 | pci_dev_put(amd_smbus_dev); | 58 | return 0; |
59 | amd_smbus_dev = NULL; | 59 | } |
60 | return 0; | 60 | } else { |
61 | amd_smbus_dev = pci_get_device(PCI_VENDOR_ID_AMD, 0x780b, NULL); | ||
62 | if (!amd_smbus_dev) | ||
63 | return 0; | ||
64 | pci_read_config_byte(amd_smbus_dev, PCI_REVISION_ID, &rev); | ||
65 | if (rev < 0x11 || rev > 0x18) { | ||
66 | pci_dev_put(amd_smbus_dev); | ||
67 | amd_smbus_dev = NULL; | ||
68 | return 0; | ||
69 | } | ||
61 | } | 70 | } |
62 | 71 | ||
63 | if (!amd_nb_dev) | 72 | if (!amd_nb_dev) |
64 | amd_nb_dev = pci_get_device(PCI_VENDOR_ID_AMD, 0x1510, NULL); | 73 | amd_nb_dev = pci_get_device(PCI_VENDOR_ID_AMD, 0x1510, NULL); |
65 | if (!amd_nb_dev) | ||
66 | ehci_err(ehci, "QUIRK: unable to get AMD NB device\n"); | ||
67 | 74 | ||
68 | ehci_info(ehci, "QUIRK: Enable AMD SB800 L1 fix\n"); | 75 | ehci_info(ehci, "QUIRK: Enable exception for AMD Hudson ASPM\n"); |
69 | 76 | ||
70 | pci_dev_put(amd_smbus_dev); | 77 | pci_dev_put(amd_smbus_dev); |
71 | amd_smbus_dev = NULL; | 78 | amd_smbus_dev = NULL; |
@@ -131,7 +138,7 @@ static int ehci_pci_setup(struct usb_hcd *hcd) | |||
131 | /* cache this readonly data; minimize chip reads */ | 138 | /* cache this readonly data; minimize chip reads */ |
132 | ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params); | 139 | ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params); |
133 | 140 | ||
134 | if (ehci_quirk_amd_SB800(ehci)) | 141 | if (ehci_quirk_amd_hudson(ehci)) |
135 | ehci->amd_l1_fix = 1; | 142 | ehci->amd_l1_fix = 1; |
136 | 143 | ||
137 | retval = ehci_halt(ehci); | 144 | retval = ehci_halt(ehci); |