X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=drivers%2Fpci%2Fquirks.c;h=480782530218525b892876fa01ea92ee64a16db9;hb=e4146bb9088c01c8b6e82be11f0c371f8aff023c;hp=bb5b46abc996f527a8688964734ac1e64fd2dd76;hpb=a5ee4eb75413c145334c30e43f1af9875dad6fd7;p=safe%2Fjmp%2Flinux-2.6 diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index bb5b46a..4807825 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -368,8 +368,9 @@ static void __devinit quirk_io_region(struct pci_dev *dev, unsigned region, bus_region.end = res->end; pcibios_bus_to_resource(dev, res, &bus_region); - pci_claim_resource(dev, nr); - dev_info(&dev->dev, "quirk: %pR claimed by %s\n", res, name); + if (pci_claim_resource(dev, nr) == 0) + dev_info(&dev->dev, "quirk: %pR claimed by %s\n", + res, name); } } @@ -2122,6 +2123,10 @@ static void __devinit quirk_disable_msi(struct pci_dev *dev) } } DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_BRIDGE, quirk_disable_msi); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x9602, quirk_disable_msi); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ASUSTEK, 0x9602, quirk_disable_msi); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AI, 0x9602, quirk_disable_msi); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, 0xa238, quirk_disable_msi); /* Go through the list of Hypertransport capabilities and * return 1 if a HT MSI capability is found and enabled */ @@ -2213,15 +2218,16 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SERVERWORKS, DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8132_BRIDGE, ht_enable_msi_mapping); -/* The P5N32-SLI Premium motherboard from Asus has a problem with msi +/* The P5N32-SLI motherboards from Asus have a problem with msi * for the MCP55 NIC. It is not yet determined whether the msi problem * also affects other devices. As for now, turn off msi for this device. */ static void __devinit nvenet_msi_disable(struct pci_dev *dev) { - if (dmi_name_in_vendors("P5N32-SLI PREMIUM")) { + if (dmi_name_in_vendors("P5N32-SLI PREMIUM") || + dmi_name_in_vendors("P5N32-E SLI")) { dev_info(&dev->dev, - "Disabling msi for MCP55 NIC on P5N32-SLI Premium\n"); + "Disabling msi for MCP55 NIC on P5N32-SLI\n"); dev->no_msi = 1; } } @@ -2493,39 +2499,6 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4374, DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4375, quirk_msi_intx_disable_bug); -/* - * MSI does not work with the AMD RS780/RS880 internal graphics and HDMI audio - * devices unless the BIOS has initialized the nb_cntl.strap_msi_enable bit. - */ -static void __init rs780_int_gfx_disable_msi(struct pci_dev *int_gfx_bridge) -{ - u32 nb_cntl; - - if (!int_gfx_bridge->subordinate) - return; - - pci_bus_write_config_dword(int_gfx_bridge->bus, PCI_DEVFN(0, 0), - 0x60, 0); - pci_bus_read_config_dword(int_gfx_bridge->bus, PCI_DEVFN(0, 0), - 0x64, &nb_cntl); - - if (!(nb_cntl & BIT(10))) { - dev_warn(&int_gfx_bridge->dev, - FW_WARN "RS780: MSI for internal graphics disabled\n"); - int_gfx_bridge->subordinate->bus_flags |= PCI_BUS_FLAGS_NO_MSI; - } -} - -#define PCI_DEVICE_ID_AMD_RS780_P2P_INT_GFX 0x9602 - -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, - PCI_DEVICE_ID_AMD_RS780_P2P_INT_GFX, - rs780_int_gfx_disable_msi); -/* wrong vendor ID on M4A785TD motherboard: */ -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ASUSTEK, - PCI_DEVICE_ID_AMD_RS780_P2P_INT_GFX, - rs780_int_gfx_disable_msi); - #endif /* CONFIG_PCI_MSI */ #ifdef CONFIG_PCI_IOV