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