diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/quirks.c | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 2fbf60eac610..63357f07ca43 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -1711,9 +1711,33 @@ static void __devinit quirk_msi_ht_cap(struct pci_dev *dev) | |||
1711 | } | 1711 | } |
1712 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT2000_PCIE, | 1712 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT2000_PCIE, |
1713 | quirk_msi_ht_cap); | 1713 | quirk_msi_ht_cap); |
1714 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, | 1714 | |
1715 | PCI_DEVICE_ID_SERVERWORKS_HT1000_PXB, | 1715 | |
1716 | quirk_msi_ht_cap); | 1716 | /* |
1717 | * Force enable MSI mapping capability on HT bridges | ||
1718 | */ | ||
1719 | static void __devinit quirk_msi_ht_cap_enable(struct pci_dev *dev) | ||
1720 | { | ||
1721 | int pos, ttl = 48; | ||
1722 | |||
1723 | pos = pci_find_ht_capability(dev, HT_CAPTYPE_MSI_MAPPING); | ||
1724 | while (pos && ttl--) { | ||
1725 | u8 flags; | ||
1726 | |||
1727 | if (pci_read_config_byte(dev, pos + HT_MSI_FLAGS, &flags) == 0) { | ||
1728 | printk(KERN_INFO "PCI: Enabling HT MSI Mapping on %s\n", | ||
1729 | pci_name(dev)); | ||
1730 | |||
1731 | pci_write_config_byte(dev, pos + HT_MSI_FLAGS, | ||
1732 | flags | HT_MSI_FLAGS_ENABLE); | ||
1733 | } | ||
1734 | pos = pci_find_next_ht_capability(dev, pos, | ||
1735 | HT_CAPTYPE_MSI_MAPPING); | ||
1736 | } | ||
1737 | } | ||
1738 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SERVERWORKS, | ||
1739 | PCI_DEVICE_ID_SERVERWORKS_HT1000_PXB, | ||
1740 | quirk_msi_ht_cap_enable); | ||
1717 | 1741 | ||
1718 | /* The nVidia CK804 chipset may have 2 HT MSI mappings. | 1742 | /* The nVidia CK804 chipset may have 2 HT MSI mappings. |
1719 | * MSI are supported if the MSI capability set in any of these mappings. | 1743 | * MSI are supported if the MSI capability set in any of these mappings. |