summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorManish Jaggi <mjaggi@caviumnetworks.com>2017-03-30 18:47:14 -0500
committerBjorn Helgaas <bhelgaas@google.com>2017-03-30 18:47:14 -0500
commitb77d537d00d08fcf0bf641cd3491dd7df0ad1475 (patch)
tree177da5471184834d04d1a05369a5534965873d6a /drivers
parentc1ae3cfa0e89fa1a7ecc4c99031f5e9ae99d9201 (diff)
downloadlwn-b77d537d00d08fcf0bf641cd3491dd7df0ad1475.tar.gz
lwn-b77d537d00d08fcf0bf641cd3491dd7df0ad1475.zip
PCI: Apply Cavium ACS quirk only to CN81xx/CN83xx/CN88xx devices
Only apply the Cavium ACS quirk to devices with ID in the range 0xa000-0xa0ff. These are the on-chip PCI devices for CN81xx/CN83xx/CN88xx. Fixes: b404bcfbf035 ("PCI: Add ACS quirk for all Cavium devices") Reported-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Manish Jaggi <mjaggi@cavium.com> Acked-by: David Daney <david.daney@cavium.com> Acked-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pci/quirks.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index f754453fe754..178242d0d9df 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -4094,6 +4094,9 @@ static int pci_quirk_cavium_acs(struct pci_dev *dev, u16 acs_flags)
acs_flags &= ~(PCI_ACS_SV | PCI_ACS_TB | PCI_ACS_RR |
PCI_ACS_CR | PCI_ACS_UF | PCI_ACS_DT);
+ if (!((dev->device >= 0xa000) && (dev->device <= 0xa0ff)))
+ return -ENOTTY;
+
return acs_flags ? 0 : 1;
}