File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -4347,15 +4347,21 @@ static int pci_quirk_amd_sb_acs(struct pci_dev *dev, u16 acs_flags)
4347
4347
4348
4348
static bool pci_quirk_cavium_acs_match (struct pci_dev * dev )
4349
4349
{
4350
+ if (!pci_is_pcie (dev ) || pci_pcie_type (dev ) != PCI_EXP_TYPE_ROOT_PORT )
4351
+ return false;
4352
+
4353
+ switch (dev -> device ) {
4350
4354
/*
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).
4355
4357
*/
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
+ }
4359
4365
}
4360
4366
4361
4367
static int pci_quirk_cavium_acs (struct pci_dev * dev , u16 acs_flags )
You can’t perform that action at this time.
0 commit comments