]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/2.6.36.4/usb-ehci-aspm-quirk-of-isoc-on-amd-hudson.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 2.6.36.4 / usb-ehci-aspm-quirk-of-isoc-on-amd-hudson.patch
CommitLineData
c9b0164c
GKH
1From baab93afc2844b68d57b0dcca5e1d34c5d7cf411 Mon Sep 17 00:00:00 2001
2From: Alex He <alex.he@amd.com>
3Date: Tue, 21 Dec 2010 17:45:46 +0800
4Subject: USB: EHCI: ASPM quirk of ISOC on AMD Hudson
5
6From: Alex He <alex.he@amd.com>
7
8commit baab93afc2844b68d57b0dcca5e1d34c5d7cf411 upstream.
9
10AMD Hudson also needs the same ASPM quirk as SB800
11
12Signed-off-by: Alex He <alex.he@amd.com>
13Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14
15---
16 drivers/usb/host/ehci-pci.c | 33 ++++++++++++++++++++-------------
17 1 file changed, 20 insertions(+), 13 deletions(-)
18
19--- a/drivers/usb/host/ehci-pci.c
20+++ b/drivers/usb/host/ehci-pci.c
21@@ -41,28 +41,35 @@ static int ehci_pci_reinit(struct ehci_h
22 return 0;
23 }
24
25-static int ehci_quirk_amd_SB800(struct ehci_hcd *ehci)
26+static int ehci_quirk_amd_hudson(struct ehci_hcd *ehci)
27 {
28 struct pci_dev *amd_smbus_dev;
29 u8 rev = 0;
30
31 amd_smbus_dev = pci_get_device(PCI_VENDOR_ID_ATI, 0x4385, NULL);
32- if (!amd_smbus_dev)
33- return 0;
34-
35- pci_read_config_byte(amd_smbus_dev, PCI_REVISION_ID, &rev);
36- if (rev < 0x40) {
37- pci_dev_put(amd_smbus_dev);
38- amd_smbus_dev = NULL;
39- return 0;
40+ if (amd_smbus_dev) {
41+ pci_read_config_byte(amd_smbus_dev, PCI_REVISION_ID, &rev);
42+ if (rev < 0x40) {
43+ pci_dev_put(amd_smbus_dev);
44+ amd_smbus_dev = NULL;
45+ return 0;
46+ }
47+ } else {
48+ amd_smbus_dev = pci_get_device(PCI_VENDOR_ID_AMD, 0x780b, NULL);
49+ if (!amd_smbus_dev)
50+ return 0;
51+ pci_read_config_byte(amd_smbus_dev, PCI_REVISION_ID, &rev);
52+ if (rev < 0x11 || rev > 0x18) {
53+ pci_dev_put(amd_smbus_dev);
54+ amd_smbus_dev = NULL;
55+ return 0;
56+ }
57 }
58
59 if (!amd_nb_dev)
60 amd_nb_dev = pci_get_device(PCI_VENDOR_ID_AMD, 0x1510, NULL);
61- if (!amd_nb_dev)
62- ehci_err(ehci, "QUIRK: unable to get AMD NB device\n");
63
64- ehci_info(ehci, "QUIRK: Enable AMD SB800 L1 fix\n");
65+ ehci_info(ehci, "QUIRK: Enable exception for AMD Hudson ASPM\n");
66
67 pci_dev_put(amd_smbus_dev);
68 amd_smbus_dev = NULL;
69@@ -128,7 +135,7 @@ static int ehci_pci_setup(struct usb_hcd
70 /* cache this readonly data; minimize chip reads */
71 ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params);
72
73- if (ehci_quirk_amd_SB800(ehci))
74+ if (ehci_quirk_amd_hudson(ehci))
75 ehci->amd_l1_fix = 1;
76
77 retval = ehci_halt(ehci);