aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/quirks.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/quirks.c')
-rw-r--r--drivers/pci/quirks.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 8284958fc530..bb5b46abc996 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -2493,6 +2493,39 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4374,
2493DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4375, 2493DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4375,
2494 quirk_msi_intx_disable_bug); 2494 quirk_msi_intx_disable_bug);
2495 2495
2496/*
2497 * MSI does not work with the AMD RS780/RS880 internal graphics and HDMI audio
2498 * devices unless the BIOS has initialized the nb_cntl.strap_msi_enable bit.
2499 */
2500static void __init rs780_int_gfx_disable_msi(struct pci_dev *int_gfx_bridge)
2501{
2502 u32 nb_cntl;
2503
2504 if (!int_gfx_bridge->subordinate)
2505 return;
2506
2507 pci_bus_write_config_dword(int_gfx_bridge->bus, PCI_DEVFN(0, 0),
2508 0x60, 0);
2509 pci_bus_read_config_dword(int_gfx_bridge->bus, PCI_DEVFN(0, 0),
2510 0x64, &nb_cntl);
2511
2512 if (!(nb_cntl & BIT(10))) {
2513 dev_warn(&int_gfx_bridge->dev,
2514 FW_WARN "RS780: MSI for internal graphics disabled\n");
2515 int_gfx_bridge->subordinate->bus_flags |= PCI_BUS_FLAGS_NO_MSI;
2516 }
2517}
2518
2519#define PCI_DEVICE_ID_AMD_RS780_P2P_INT_GFX 0x9602
2520
2521DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD,
2522 PCI_DEVICE_ID_AMD_RS780_P2P_INT_GFX,
2523 rs780_int_gfx_disable_msi);
2524/* wrong vendor ID on M4A785TD motherboard: */
2525DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ASUSTEK,
2526 PCI_DEVICE_ID_AMD_RS780_P2P_INT_GFX,
2527 rs780_int_gfx_disable_msi);
2528
2496#endif /* CONFIG_PCI_MSI */ 2529#endif /* CONFIG_PCI_MSI */
2497 2530
2498#ifdef CONFIG_PCI_IOV 2531#ifdef CONFIG_PCI_IOV