diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2010-05-26 06:21:10 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2010-07-30 12:29:11 -0400 |
commit | aff6136974e4ac43574973a5b4de15d97506b16a (patch) | |
tree | 4347e297898fd99291253081cf45c52675636389 /drivers/pci | |
parent | 3b8fdb759e6ed446433c6dfd5a226d9007925596 (diff) |
PCI quirk: AMD 780: work around wrong vendor ID on APC bridge
In all AMD 780 family northbridges, the vendor ID of the internal
graphics PCI/PCI bridge reads not as AMD but as that of the mainboard
vendor, because the hardware actually returns the value of the subsystem
vendor ID (erratum 18).
We currently have additional quirk entries for Asus and Acer, but it is
likely that we will encounter more systems with other vendor IDs.
Since we do not know in advance all possible vendor IDs, a better way to
find the device is to declare the quirk on the host bridge, whose ID is
always correct, and use that device as a stepping stone to find the PCI/
PCI bridge, if present.
Reviewed-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/quirks.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 477345d41641..4334d15a8141 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -2126,12 +2126,29 @@ static void __devinit quirk_disable_msi(struct pci_dev *dev) | |||
2126 | } | 2126 | } |
2127 | } | 2127 | } |
2128 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_BRIDGE, quirk_disable_msi); | 2128 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_BRIDGE, quirk_disable_msi); |
2129 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x9602, quirk_disable_msi); | ||
2130 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ASUSTEK, 0x9602, quirk_disable_msi); | ||
2131 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AI, 0x9602, quirk_disable_msi); | ||
2132 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, 0xa238, quirk_disable_msi); | 2129 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, 0xa238, quirk_disable_msi); |
2133 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x5a3f, quirk_disable_msi); | 2130 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x5a3f, quirk_disable_msi); |
2134 | 2131 | ||
2132 | /* | ||
2133 | * The APC bridge device in AMD 780 family northbridges has some random | ||
2134 | * OEM subsystem ID in its vendor ID register (erratum 18), so instead | ||
2135 | * we use the possible vendor/device IDs of the host bridge for the | ||
2136 | * declared quirk, and search for the APC bridge by slot number. | ||
2137 | */ | ||
2138 | static void __devinit quirk_amd_780_apc_msi(struct pci_dev *host_bridge) | ||
2139 | { | ||
2140 | struct pci_dev *apc_bridge; | ||
2141 | |||
2142 | apc_bridge = pci_get_slot(host_bridge->bus, PCI_DEVFN(1, 0)); | ||
2143 | if (apc_bridge) { | ||
2144 | if (apc_bridge->device == 0x9602) | ||
2145 | quirk_disable_msi(apc_bridge); | ||
2146 | pci_dev_put(apc_bridge); | ||
2147 | } | ||
2148 | } | ||
2149 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x9600, quirk_amd_780_apc_msi); | ||
2150 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x9601, quirk_amd_780_apc_msi); | ||
2151 | |||
2135 | /* Go through the list of Hypertransport capabilities and | 2152 | /* Go through the list of Hypertransport capabilities and |
2136 | * return 1 if a HT MSI capability is found and enabled */ | 2153 | * return 1 if a HT MSI capability is found and enabled */ |
2137 | static int __devinit msi_ht_cap_enabled(struct pci_dev *dev) | 2154 | static int __devinit msi_ht_cap_enabled(struct pci_dev *dev) |