Skip to content

Commit f338bb9

Browse files
georgecherian81bjorn-helgaas
authored andcommitted
PCI: Apply Cavium ACS quirk to ThunderX2 and ThunderX3
Enhance the ACS quirk for Cavium Processors. Add the root port vendor IDs for ThunderX2 and ThunderX3 series of processors. [bhelgaas: add Fixes: and stable tag] Fixes: f2ddaf8 ("PCI: Apply Cavium ThunderX ACS quirk to more Root Ports") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: George Cherian <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Robert Richter <[email protected]> Cc: [email protected] # v4.12+
1 parent 35ff867 commit f338bb9

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

drivers/pci/quirks.c

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4347,15 +4347,21 @@ static int pci_quirk_amd_sb_acs(struct pci_dev *dev, u16 acs_flags)
43474347

43484348
static bool pci_quirk_cavium_acs_match(struct pci_dev *dev)
43494349
{
4350+
if (!pci_is_pcie(dev) || pci_pcie_type(dev) != PCI_EXP_TYPE_ROOT_PORT)
4351+
return false;
4352+
4353+
switch (dev->device) {
43504354
/*
4351-
* Effectively selects all downstream ports for whole ThunderX 1
4352-
* family by 0xf800 mask (which represents 8 SoCs), while the lower
4353-
* bits of device ID are used to indicate which subdevice is used
4354-
* within the SoC.
4355+
* Effectively selects all downstream ports for whole ThunderX1
4356+
* (which represents 8 SoCs).
43554357
*/
4356-
return (pci_is_pcie(dev) &&
4357-
(pci_pcie_type(dev) == PCI_EXP_TYPE_ROOT_PORT) &&
4358-
((dev->device & 0xf800) == 0xa000));
4358+
case 0xa000 ... 0xa7ff: /* ThunderX1 */
4359+
case 0xaf84: /* ThunderX2 */
4360+
case 0xb884: /* ThunderX3 */
4361+
return true;
4362+
default:
4363+
return false;
4364+
}
43594365
}
43604366

43614367
static int pci_quirk_cavium_acs(struct pci_dev *dev, u16 acs_flags)

0 commit comments

Comments
 (0)