diff options
Diffstat (limited to 'drivers/pci/quirks.c')
-rw-r--r-- | drivers/pci/quirks.c | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index c559085c89a5..50f2dd9e1bb2 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -947,7 +947,7 @@ static void k8t_sound_hostbridge(struct pci_dev *dev) | |||
947 | unsigned char val; | 947 | unsigned char val; |
948 | 948 | ||
949 | pci_read_config_byte(dev, 0x50, &val); | 949 | pci_read_config_byte(dev, 0x50, &val); |
950 | if (val == 0x88 || val == 0xc8) { | 950 | if (val == 0xc8) { |
951 | /* Assume it's probably a MSI-K8T-Neo2Fir */ | 951 | /* Assume it's probably a MSI-K8T-Neo2Fir */ |
952 | printk(KERN_INFO "PCI: MSI-K8T-Neo2Fir, attempting to turn soundcard ON\n"); | 952 | printk(KERN_INFO "PCI: MSI-K8T-Neo2Fir, attempting to turn soundcard ON\n"); |
953 | pci_write_config_byte(dev, 0x50, val & (~0x40)); | 953 | pci_write_config_byte(dev, 0x50, val & (~0x40)); |
@@ -972,8 +972,8 @@ DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, k8t_sound_ho | |||
972 | * | 972 | * |
973 | * The SMBus PCI Device can be activated by setting a bit in the ICH LPC | 973 | * The SMBus PCI Device can be activated by setting a bit in the ICH LPC |
974 | * bridge. Unfortunately, this device has no subvendor/subdevice ID. So it | 974 | * bridge. Unfortunately, this device has no subvendor/subdevice ID. So it |
975 | * becomes necessary to do this tweak in two steps -- I've chosen the Host | 975 | * becomes necessary to do this tweak in two steps -- the chosen trigger |
976 | * bridge as trigger. | 976 | * is either the Host bridge (preferred) or on-board VGA controller. |
977 | * | 977 | * |
978 | * Note that we used to unhide the SMBus that way on Toshiba laptops | 978 | * Note that we used to unhide the SMBus that way on Toshiba laptops |
979 | * (Satellite A40 and Tecra M2) but then found that the thermal management | 979 | * (Satellite A40 and Tecra M2) but then found that the thermal management |
@@ -1070,6 +1070,14 @@ static void __init asus_hides_smbus_hostbridge(struct pci_dev *dev) | |||
1070 | case 0x0058: /* Compaq Evo N620c */ | 1070 | case 0x0058: /* Compaq Evo N620c */ |
1071 | asus_hides_smbus = 1; | 1071 | asus_hides_smbus = 1; |
1072 | } | 1072 | } |
1073 | else if (dev->device == PCI_DEVICE_ID_INTEL_82810_IG3) | ||
1074 | switch(dev->subsystem_device) { | ||
1075 | case 0xB16C: /* Compaq Deskpro EP 401963-001 (PCA# 010174) */ | ||
1076 | /* Motherboard doesn't have Host bridge | ||
1077 | * subvendor/subdevice IDs, therefore checking | ||
1078 | * its on-board VGA controller */ | ||
1079 | asus_hides_smbus = 1; | ||
1080 | } | ||
1073 | } | 1081 | } |
1074 | } | 1082 | } |
1075 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82845_HB, asus_hides_smbus_hostbridge ); | 1083 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82845_HB, asus_hides_smbus_hostbridge ); |
@@ -1082,6 +1090,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82855PM_HB, as | |||
1082 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82855GM_HB, asus_hides_smbus_hostbridge ); | 1090 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82855GM_HB, asus_hides_smbus_hostbridge ); |
1083 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82915GM_HB, asus_hides_smbus_hostbridge ); | 1091 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82915GM_HB, asus_hides_smbus_hostbridge ); |
1084 | 1092 | ||
1093 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82810_IG3, asus_hides_smbus_hostbridge ); | ||
1094 | |||
1085 | static void asus_hides_smbus_lpc(struct pci_dev *dev) | 1095 | static void asus_hides_smbus_lpc(struct pci_dev *dev) |
1086 | { | 1096 | { |
1087 | u16 val; | 1097 | u16 val; |
@@ -1099,12 +1109,14 @@ static void asus_hides_smbus_lpc(struct pci_dev *dev) | |||
1099 | printk(KERN_INFO "PCI: Enabled i801 SMBus device\n"); | 1109 | printk(KERN_INFO "PCI: Enabled i801 SMBus device\n"); |
1100 | } | 1110 | } |
1101 | } | 1111 | } |
1112 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AA_0, asus_hides_smbus_lpc ); | ||
1102 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0, asus_hides_smbus_lpc ); | 1113 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0, asus_hides_smbus_lpc ); |
1103 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_0, asus_hides_smbus_lpc ); | 1114 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_0, asus_hides_smbus_lpc ); |
1104 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0, asus_hides_smbus_lpc ); | 1115 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0, asus_hides_smbus_lpc ); |
1105 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_12, asus_hides_smbus_lpc ); | 1116 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_12, asus_hides_smbus_lpc ); |
1106 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_12, asus_hides_smbus_lpc ); | 1117 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_12, asus_hides_smbus_lpc ); |
1107 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0, asus_hides_smbus_lpc ); | 1118 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0, asus_hides_smbus_lpc ); |
1119 | DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AA_0, asus_hides_smbus_lpc ); | ||
1108 | DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0, asus_hides_smbus_lpc ); | 1120 | DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0, asus_hides_smbus_lpc ); |
1109 | DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_0, asus_hides_smbus_lpc ); | 1121 | DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_0, asus_hides_smbus_lpc ); |
1110 | DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0, asus_hides_smbus_lpc ); | 1122 | DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0, asus_hides_smbus_lpc ); |
@@ -1432,7 +1444,6 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NETMOS, PCI_ANY_ID, quirk_netmos); | |||
1432 | static void __devinit quirk_e100_interrupt(struct pci_dev *dev) | 1444 | static void __devinit quirk_e100_interrupt(struct pci_dev *dev) |
1433 | { | 1445 | { |
1434 | u16 command; | 1446 | u16 command; |
1435 | u32 bar; | ||
1436 | u8 __iomem *csr; | 1447 | u8 __iomem *csr; |
1437 | u8 cmd_hi; | 1448 | u8 cmd_hi; |
1438 | 1449 | ||
@@ -1464,12 +1475,12 @@ static void __devinit quirk_e100_interrupt(struct pci_dev *dev) | |||
1464 | * re-enable them when it's ready. | 1475 | * re-enable them when it's ready. |
1465 | */ | 1476 | */ |
1466 | pci_read_config_word(dev, PCI_COMMAND, &command); | 1477 | pci_read_config_word(dev, PCI_COMMAND, &command); |
1467 | pci_read_config_dword(dev, PCI_BASE_ADDRESS_0, &bar); | ||
1468 | 1478 | ||
1469 | if (!(command & PCI_COMMAND_MEMORY) || !bar) | 1479 | if (!(command & PCI_COMMAND_MEMORY) || !pci_resource_start(dev, 0)) |
1470 | return; | 1480 | return; |
1471 | 1481 | ||
1472 | csr = ioremap(bar, 8); | 1482 | /* Convert from PCI bus to resource space. */ |
1483 | csr = ioremap(pci_resource_start(dev, 0), 8); | ||
1473 | if (!csr) { | 1484 | if (!csr) { |
1474 | printk(KERN_WARNING "PCI: Can't map %s e100 registers\n", | 1485 | printk(KERN_WARNING "PCI: Can't map %s e100 registers\n", |
1475 | pci_name(dev)); | 1486 | pci_name(dev)); |
@@ -1485,7 +1496,7 @@ static void __devinit quirk_e100_interrupt(struct pci_dev *dev) | |||
1485 | 1496 | ||
1486 | iounmap(csr); | 1497 | iounmap(csr); |
1487 | } | 1498 | } |
1488 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, quirk_e100_interrupt); | 1499 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, quirk_e100_interrupt); |
1489 | 1500 | ||
1490 | static void __devinit fixup_rev1_53c810(struct pci_dev* dev) | 1501 | static void __devinit fixup_rev1_53c810(struct pci_dev* dev) |
1491 | { | 1502 | { |
@@ -1650,6 +1661,9 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_GCN | |||
1650 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT1000_PCIX, quirk_disable_all_msi); | 1661 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT1000_PCIX, quirk_disable_all_msi); |
1651 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS400_200, quirk_disable_all_msi); | 1662 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS400_200, quirk_disable_all_msi); |
1652 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS480, quirk_disable_all_msi); | 1663 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS480, quirk_disable_all_msi); |
1664 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RD580, quirk_disable_all_msi); | ||
1665 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RX790, quirk_disable_all_msi); | ||
1666 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS690, quirk_disable_all_msi); | ||
1653 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3351, quirk_disable_all_msi); | 1667 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3351, quirk_disable_all_msi); |
1654 | 1668 | ||
1655 | /* Disable MSI on chipsets that are known to not support it */ | 1669 | /* Disable MSI on chipsets that are known to not support it */ |