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.c41
1 files changed, 8 insertions, 33 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index bbad4a9f264f..e9a333d98552 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -1652,9 +1652,8 @@ static void __devinit quirk_via_cx700_pci_parking_caching(struct pci_dev *dev)
1652 pci_write_config_byte(dev, 0x75, 0x1); 1652 pci_write_config_byte(dev, 0x75, 0x1);
1653 pci_write_config_byte(dev, 0x77, 0x0); 1653 pci_write_config_byte(dev, 0x77, 0x0);
1654 1654
1655 printk(KERN_INFO 1655 dev_info(&dev->dev,
1656 "PCI: VIA CX700 PCI parking/caching fixup on %s\n", 1656 "Disabling VIA CX700 PCI parking/caching\n");
1657 pci_name(dev));
1658 } 1657 }
1659 } 1658 }
1660} 1659}
@@ -1726,32 +1725,6 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT2
1726 quirk_msi_ht_cap); 1725 quirk_msi_ht_cap);
1727 1726
1728 1727
1729/*
1730 * Force enable MSI mapping capability on HT bridges
1731 */
1732static void __devinit quirk_msi_ht_cap_enable(struct pci_dev *dev)
1733{
1734 int pos, ttl = 48;
1735
1736 pos = pci_find_ht_capability(dev, HT_CAPTYPE_MSI_MAPPING);
1737 while (pos && ttl--) {
1738 u8 flags;
1739
1740 if (pci_read_config_byte(dev, pos + HT_MSI_FLAGS, &flags) == 0) {
1741 printk(KERN_INFO "PCI: Enabling HT MSI Mapping on %s\n",
1742 pci_name(dev));
1743
1744 pci_write_config_byte(dev, pos + HT_MSI_FLAGS,
1745 flags | HT_MSI_FLAGS_ENABLE);
1746 }
1747 pos = pci_find_next_ht_capability(dev, pos,
1748 HT_CAPTYPE_MSI_MAPPING);
1749 }
1750}
1751DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SERVERWORKS,
1752 PCI_DEVICE_ID_SERVERWORKS_HT1000_PXB,
1753 quirk_msi_ht_cap_enable);
1754
1755/* The nVidia CK804 chipset may have 2 HT MSI mappings. 1728/* The nVidia CK804 chipset may have 2 HT MSI mappings.
1756 * MSI are supported if the MSI capability set in any of these mappings. 1729 * MSI are supported if the MSI capability set in any of these mappings.
1757 */ 1730 */
@@ -1778,9 +1751,8 @@ static void __devinit quirk_nvidia_ck804_msi_ht_cap(struct pci_dev *dev)
1778DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_CK804_PCIE, 1751DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_CK804_PCIE,
1779 quirk_nvidia_ck804_msi_ht_cap); 1752 quirk_nvidia_ck804_msi_ht_cap);
1780 1753
1781/* 1754/* Force enable MSI mapping capability on HT bridges */
1782 * Force enable MSI mapping capability on HT bridges */ 1755static void __devinit ht_enable_msi_mapping(struct pci_dev *dev)
1783static inline void ht_enable_msi_mapping(struct pci_dev *dev)
1784{ 1756{
1785 int pos, ttl = 48; 1757 int pos, ttl = 48;
1786 1758
@@ -1799,6 +1771,9 @@ static inline void ht_enable_msi_mapping(struct pci_dev *dev)
1799 HT_CAPTYPE_MSI_MAPPING); 1771 HT_CAPTYPE_MSI_MAPPING);
1800 } 1772 }
1801} 1773}
1774DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SERVERWORKS,
1775 PCI_DEVICE_ID_SERVERWORKS_HT1000_PXB,
1776 ht_enable_msi_mapping);
1802 1777
1803static void __devinit nv_msi_ht_cap_quirk(struct pci_dev *dev) 1778static void __devinit nv_msi_ht_cap_quirk(struct pci_dev *dev)
1804{ 1779{
@@ -1830,7 +1805,7 @@ static void __devinit nv_msi_ht_cap_quirk(struct pci_dev *dev)
1830 1805
1831 if (pci_read_config_byte(dev, pos + HT_MSI_FLAGS, 1806 if (pci_read_config_byte(dev, pos + HT_MSI_FLAGS,
1832 &flags) == 0) { 1807 &flags) == 0) {
1833 dev_info(&dev->dev, "Quirk disabling HT MSI mapping"); 1808 dev_info(&dev->dev, "Disabling HT MSI mapping");
1834 pci_write_config_byte(dev, pos + HT_MSI_FLAGS, 1809 pci_write_config_byte(dev, pos + HT_MSI_FLAGS,
1835 flags & ~HT_MSI_FLAGS_ENABLE); 1810 flags & ~HT_MSI_FLAGS_ENABLE);
1836 } 1811 }