Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 232623
b: refs/heads/master
c: baab93a
h: refs/heads/master
i:
  232621: 0afcbcc
  232619: 4e6f414
  232615: 85721a0
  232607: c542872
v: v3
  • Loading branch information
Alex He authored and Greg Kroah-Hartman committed Jan 23, 2011
1 parent 23e27a0 commit 0a7872d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1e4cba8bd2cddd10849e769ff502e255c27c81b4
refs/heads/master: baab93afc2844b68d57b0dcca5e1d34c5d7cf411
33 changes: 20 additions & 13 deletions trunk/drivers/usb/host/ehci-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,28 +44,35 @@ static int ehci_pci_reinit(struct ehci_hcd *ehci, struct pci_dev *pdev)
return 0;
}

static int ehci_quirk_amd_SB800(struct ehci_hcd *ehci)
static int ehci_quirk_amd_hudson(struct ehci_hcd *ehci)
{
struct pci_dev *amd_smbus_dev;
u8 rev = 0;

amd_smbus_dev = pci_get_device(PCI_VENDOR_ID_ATI, 0x4385, NULL);
if (!amd_smbus_dev)
return 0;

pci_read_config_byte(amd_smbus_dev, PCI_REVISION_ID, &rev);
if (rev < 0x40) {
pci_dev_put(amd_smbus_dev);
amd_smbus_dev = NULL;
return 0;
if (amd_smbus_dev) {
pci_read_config_byte(amd_smbus_dev, PCI_REVISION_ID, &rev);
if (rev < 0x40) {
pci_dev_put(amd_smbus_dev);
amd_smbus_dev = NULL;
return 0;
}
} else {
amd_smbus_dev = pci_get_device(PCI_VENDOR_ID_AMD, 0x780b, NULL);
if (!amd_smbus_dev)
return 0;
pci_read_config_byte(amd_smbus_dev, PCI_REVISION_ID, &rev);
if (rev < 0x11 || rev > 0x18) {
pci_dev_put(amd_smbus_dev);
amd_smbus_dev = NULL;
return 0;
}
}

if (!amd_nb_dev)
amd_nb_dev = pci_get_device(PCI_VENDOR_ID_AMD, 0x1510, NULL);
if (!amd_nb_dev)
ehci_err(ehci, "QUIRK: unable to get AMD NB device\n");

ehci_info(ehci, "QUIRK: Enable AMD SB800 L1 fix\n");
ehci_info(ehci, "QUIRK: Enable exception for AMD Hudson ASPM\n");

pci_dev_put(amd_smbus_dev);
amd_smbus_dev = NULL;
Expand Down Expand Up @@ -131,7 +138,7 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
/* cache this readonly data; minimize chip reads */
ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params);

if (ehci_quirk_amd_SB800(ehci))
if (ehci_quirk_amd_hudson(ehci))
ehci->amd_l1_fix = 1;

retval = ehci_halt(ehci);
Expand Down

0 comments on commit 0a7872d

Please sign in to comment.