aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastien Dugue <sebastien.dugue@bull.net>2007-12-13 19:09:25 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-02-01 18:04:25 -0500
commit6bae1d96c6d7dde078994f6cb98235fd46f8736b (patch)
treef3ffd1b3ef665ef8c8434494f546f613be653286
parent6015fbefc4dfe1706b64d33c256878b8296d1470 (diff)
PCI: quirk: enable MSI Mapping on HT1000
Add a quirk to enable the MSI mapping capability on HyperTransport bridges. Wire Broadcom's HT1000 to use the quirk. Signed-off-by: Sebastien Dugue <sebastien.dugue@bull.net> Acked-by: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Andy Currid <acurrid@nvidia.com> Cc: Peer Chen <pchen@nvidia.com> Cc: Prakash Punnoor <prakash@punnoor.de> Cc: Andrew Morton <akpm@linux-foundation.org> Acked-by: Michael Chan <mchan@broadcom.com> Cc: Greg KH <greg@kroah.com> Cc: Andy Currid <acurrid@nvidia.com> Cc: Peer Chen <pchen@nvidia.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/pci/quirks.c30
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}
1712DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT2000_PCIE, 1712DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT2000_PCIE,
1713 quirk_msi_ht_cap); 1713 quirk_msi_ht_cap);
1714DECLARE_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 */
1719static 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}
1738DECLARE_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.