PCI: Enhance the ACS quirk for Cavium devices
PATCH v2 1/1 PCI: Enhance the ACS quirk for Cavium devices
Enhance the ACS quirk for Cavium Processors. Add the root port vendor ID's for ThunderX2 and ThunderX3 series of processors.
Signed-off-by George Cherian <[email protected]>
Reviewed-by Robert Richter <[email protected]>
--- drivers/pci/quirks.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-)
drivers/pci/quirks.c +13 -7
@@ -4243,15 +4243,21 @@ static int pci_quirk_amd_sb_acs(struct pci_dev *dev, u16 acs_flags)static bool pci_quirk_cavium_acs_match (struct pci_dev *dev) { +if (!pci_is_pcie (dev) ||pci_pcie_type (dev) !=PCI_EXP_TYPE_ROOT_PORT ) +return false; + +switch (dev->device) {/* -* Effectively selects all downstream ports for whole ThunderX 1 -* family by 0xf800 mask (which represents 8 SoCs), while the lower -* bits of device ID are used to indicate which subdevice is used -* within the SoC. +* Effectively selects all downstream ports for whole ThunderX1 +* (which represents 8 SoCs). */ -return (pci_is_pcie (dev) && - (pci_pcie_type (dev) ==PCI_EXP_TYPE_ROOT_PORT ) && - ((dev->device &0xf800 ) ==0xa000 )); + case 0xa000 ... 0xa7ff: /* ThunderX1 */ +case 0xaf84 :/* ThunderX2 */ +case 0xb884 :/* ThunderX3 */ +return true; +default : +return false; + } }static int pci_quirk_cavium_acs (struct pci_dev *dev,u16 acs_flags)
Signature · 1 line
2.17.1
Bjorn Helgaas
AppliedQuoted 5 lines · George Cherian
Enhance the ACS quirk for Cavium Processors. Add the root port vendor ID's for ThunderX2 and ThunderX3 series of processors.
Signed-off-by George Cherian <[email protected]>Reviewed-by Robert Richter <[email protected]>
Applied to pci/virtualization for v5.5, thanks!
I added a Fixes: f2ddaf8dfd4a ("PCI: Apply Cavium ThunderX ACS quirk to more Root Ports") since it refines that patch, and also a stable tag (like f2ddaf8dfd4a).
Quoted 40 lines
--- drivers/pci/quirks.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-)drivers/pci/quirks.c +13
-7@@ -4243,15 +4243,21 @@ static int pci_quirk_amd_sb_acs(struct pci_dev *dev, u16 acs_flags)static bool pci_quirk_cavium_acs_match (struct pci_dev *dev) { +if (!pci_is_pcie (dev) ||pci_pcie_type (dev) !=PCI_EXP_TYPE_ROOT_PORT ) +return false; + +switch (dev->device) {/* -* Effectively selects all downstream ports for whole ThunderX 1 -* family by 0xf800 mask (which represents 8 SoCs), while the lower -* bits of device ID are used to indicate which subdevice is used -* within the SoC. +* Effectively selects all downstream ports for whole ThunderX1 +* (which represents 8 SoCs). */ -return (pci_is_pcie (dev) && - (pci_pcie_type (dev) ==PCI_EXP_TYPE_ROOT_PORT ) && - ((dev->device &0xf800 ) ==0xa000 )); + case 0xa000 ... 0xa7ff: /* ThunderX1 */ +case 0xaf84 :/* ThunderX2 */ +case 0xb884 :/* ThunderX3 */ +return true; +default : +return false; + } }static int pci_quirk_cavium_acs (struct pci_dev *dev,u16 acs_flags)Signature · 1 line
2.17.1