aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2014-09-17 10:59:36 -0400
committerBjorn Helgaas <bhelgaas@google.com>2014-09-22 17:04:06 -0400
commit89b51cb5c3b0e8c2b8016c60f3386a5bfa468498 (patch)
tree1e835c3d3360efedce71094f19dbdbf791930e25
parent5d8f4c9fdd67404c9f94683836e49ec8bded2287 (diff)
PCI: Add ACS quirk for Solarflare SFC9120 & SFC9140
Solarflare confirms that these devices do not allow peer-to-peer between functions. Quirk them to allow IOMMU grouping to expose this isolation. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Robert Stonehouse <rstonehouse@solarflare.com>
-rw-r--r--drivers/pci/quirks.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 01c935cc38dc..81777c27e14c 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -3615,6 +3615,21 @@ static int pci_quirk_intel_pch_acs(struct pci_dev *dev, u16 acs_flags)
3615 return acs_flags & ~flags ? 0 : 1; 3615 return acs_flags & ~flags ? 0 : 1;
3616} 3616}
3617 3617
3618static int pci_quirk_solarflare_acs(struct pci_dev *dev, u16 acs_flags)
3619{
3620 /*
3621 * SV, TB, and UF are not relevant to multifunction endpoints.
3622 *
3623 * Solarflare indicates that peer-to-peer between functions is not
3624 * possible, therefore RR, CR, and DT are not implemented. Mask
3625 * these out as if they were clear in the ACS capabilities register.
3626 */
3627 acs_flags &= ~(PCI_ACS_SV | PCI_ACS_TB | PCI_ACS_RR |
3628 PCI_ACS_CR | PCI_ACS_UF | PCI_ACS_DT);
3629
3630 return acs_flags ? 0 : 1;
3631}
3632
3618static const struct pci_dev_acs_enabled { 3633static const struct pci_dev_acs_enabled {
3619 u16 vendor; 3634 u16 vendor;
3620 u16 device; 3635 u16 device;
@@ -3626,6 +3641,8 @@ static const struct pci_dev_acs_enabled {
3626 { PCI_VENDOR_ID_ATI, 0x439d, pci_quirk_amd_sb_acs }, 3641 { PCI_VENDOR_ID_ATI, 0x439d, pci_quirk_amd_sb_acs },
3627 { PCI_VENDOR_ID_ATI, 0x4384, pci_quirk_amd_sb_acs }, 3642 { PCI_VENDOR_ID_ATI, 0x4384, pci_quirk_amd_sb_acs },
3628 { PCI_VENDOR_ID_ATI, 0x4399, pci_quirk_amd_sb_acs }, 3643 { PCI_VENDOR_ID_ATI, 0x4399, pci_quirk_amd_sb_acs },
3644 { PCI_VENDOR_ID_SOLARFLARE, 0x0903, pci_quirk_solarflare_acs },
3645 { PCI_VENDOR_ID_SOLARFLARE, 0x0923, pci_quirk_solarflare_acs },
3629 { PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_quirk_intel_pch_acs }, 3646 { PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_quirk_intel_pch_acs },
3630 { 0 } 3647 { 0 }
3631}; 3648};