aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/quirks.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-03-23 18:49:57 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-23 18:49:57 -0500
commita3ea9b584ed2acdeae817f0dc91a5880e0828a05 (patch)
tree5b4ef9b10c05aa84419a6ba6187d0dcd14654c97 /drivers/pci/quirks.c
parent554f593d6c411e717a71ffdcb0cfb46bb2394502 (diff)
parentb2e6e3ba7deb525f180df64f32f3fcb214538bea (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (49 commits) [PATCH] acpiphp: fix acpi_path_name [PATCH] ibmphp: remove TRUE and FALSE [PATCH] PCI Hotplug: add common acpi functions to core [PATCH] PCI: kzalloc() conversion in drivers/pci [PATCH] acpiphp: Scan slots under the nested P2P bridge [PATCH] PCI Hotplug: SN: Fix cleanup on hotplug removal of PPB [PATCH] shpchp: cleanup bus speed handling [PATCH] PCI: fix pci_request_region[s] arg [PATCH] PCI: Provide a boot parameter to disable MSI [PATCH] PCI: the scheduled removal of PCI_LEGACY_PROC [PATCH] PCI: cpqphp_ctrl.c: board_replaced(): remove dead code [PATCH] acpiphp: fix bridge handle [PATCH] acpiphp - slot management fix - V4 [PATCH] acpi: remove dock event handling from ibm_acpi [PATCH] acpiphp: add dock event handling [PATCH] acpi: export acpi_bus_trim [PATCH] acpiphp: add new bus to acpi [PATCH] PCI: Move pci_dev_put outside a spinlock [PATCH] PCI: PCI/Cardbus cards hidden, needs pci=assign-busses to fix [PATCH] PCI: fix problems with MSI-X on ia64 ...
Diffstat (limited to 'drivers/pci/quirks.c')
-rw-r--r--drivers/pci/quirks.c71
1 files changed, 69 insertions, 2 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index dda6099903c1..4970f47be72c 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -575,8 +575,11 @@ static void __init quirk_amd_8131_ioapic(struct pci_dev *dev)
575{ 575{
576 unsigned char revid, tmp; 576 unsigned char revid, tmp;
577 577
578 pci_msi_quirk = 1; 578 if (dev->subordinate) {
579 printk(KERN_WARNING "PCI: MSI quirk detected. pci_msi_quirk set.\n"); 579 printk(KERN_WARNING "PCI: MSI quirk detected. "
580 "PCI_BUS_FLAGS_NO_MSI set for subordinate bus.\n");
581 dev->subordinate->bus_flags |= PCI_BUS_FLAGS_NO_MSI;
582 }
580 583
581 if (nr_ioapics == 0) 584 if (nr_ioapics == 0)
582 return; 585 return;
@@ -934,6 +937,12 @@ static void __init asus_hides_smbus_hostbridge(struct pci_dev *dev)
934 case 0x12bd: /* HP D530 */ 937 case 0x12bd: /* HP D530 */
935 asus_hides_smbus = 1; 938 asus_hides_smbus = 1;
936 } 939 }
940 if (dev->device == PCI_DEVICE_ID_INTEL_82915GM_HB) {
941 switch (dev->subsystem_device) {
942 case 0x099c: /* HP Compaq nx6110 */
943 asus_hides_smbus = 1;
944 }
945 }
937 } else if (unlikely(dev->subsystem_vendor == PCI_VENDOR_ID_TOSHIBA)) { 946 } else if (unlikely(dev->subsystem_vendor == PCI_VENDOR_ID_TOSHIBA)) {
938 if (dev->device == PCI_DEVICE_ID_INTEL_82855GM_HB) 947 if (dev->device == PCI_DEVICE_ID_INTEL_82855GM_HB)
939 switch(dev->subsystem_device) { 948 switch(dev->subsystem_device) {
@@ -1068,6 +1077,37 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_651, quirk_sis_96x_
1068DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_735, quirk_sis_96x_compatible ); 1077DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_735, quirk_sis_96x_compatible );
1069 1078
1070DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503, quirk_sis_503 ); 1079DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503, quirk_sis_503 );
1080/*
1081 * On ASUS A8V and A8V Deluxe boards, the onboard AC97 audio controller
1082 * and MC97 modem controller are disabled when a second PCI soundcard is
1083 * present. This patch, tweaking the VT8237 ISA bridge, enables them.
1084 * -- bjd
1085 */
1086static void __init asus_hides_ac97_lpc(struct pci_dev *dev)
1087{
1088 u8 val;
1089 int asus_hides_ac97 = 0;
1090
1091 if (likely(dev->subsystem_vendor == PCI_VENDOR_ID_ASUSTEK)) {
1092 if (dev->device == PCI_DEVICE_ID_VIA_8237)
1093 asus_hides_ac97 = 1;
1094 }
1095
1096 if (!asus_hides_ac97)
1097 return;
1098
1099 pci_read_config_byte(dev, 0x50, &val);
1100 if (val & 0xc0) {
1101 pci_write_config_byte(dev, 0x50, val & (~0xc0));
1102 pci_read_config_byte(dev, 0x50, &val);
1103 if (val & 0xc0)
1104 printk(KERN_INFO "PCI: onboard AC97/MC97 devices continue to play 'hide and seek'! 0x%x\n", val);
1105 else
1106 printk(KERN_INFO "PCI: enabled onboard AC97/MC97 devices\n");
1107 }
1108}
1109DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, asus_hides_ac97_lpc );
1110
1071 1111
1072DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_961, quirk_sis_96x_smbus ); 1112DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_961, quirk_sis_96x_smbus );
1073DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_962, quirk_sis_96x_smbus ); 1113DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_962, quirk_sis_96x_smbus );
@@ -1242,6 +1282,33 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PXH_1, quirk_pc
1242DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PXHV, quirk_pcie_pxh); 1282DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PXHV, quirk_pcie_pxh);
1243 1283
1244 1284
1285/*
1286 * Fixup the cardbus bridges on the IBM Dock II docking station
1287 */
1288static void __devinit quirk_ibm_dock2_cardbus(struct pci_dev *dev)
1289{
1290 u32 val;
1291
1292 /*
1293 * tie the 2 interrupt pins to INTA, and configure the
1294 * multifunction routing register to handle this.
1295 */
1296 if ((dev->subsystem_vendor == PCI_VENDOR_ID_IBM) &&
1297 (dev->subsystem_device == 0x0148)) {
1298 printk(KERN_INFO "PCI: Found IBM Dock II Cardbus Bridge "
1299 "applying quirk\n");
1300 pci_read_config_dword(dev, 0x8c, &val);
1301 val = ((val & 0xffffff00) | 0x1002);
1302 pci_write_config_dword(dev, 0x8c, val);
1303 pci_read_config_dword(dev, 0x80, &val);
1304 val = ((val & 0x00ffff00) | 0x2864c077);
1305 pci_write_config_dword(dev, 0x80, val);
1306 }
1307}
1308
1309DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1420,
1310 quirk_ibm_dock2_cardbus);
1311
1245static void __devinit quirk_netmos(struct pci_dev *dev) 1312static void __devinit quirk_netmos(struct pci_dev *dev)
1246{ 1313{
1247 unsigned int num_parallel = (dev->subsystem_device & 0xf0) >> 4; 1314 unsigned int num_parallel = (dev->subsystem_device & 0xf0) >> 4;