Skip to content

Commit aa46a37

Browse files
Mengyuan Loubjorn-helgaas
authored andcommitted
PCI: Add ACS quirk for Wangxun FF5xxx NICs
Wangxun FF5xxx NICs are similar to SFxxx, RP1000 and RP2000 NICs. They may be multi-function devices, but they do not advertise an ACS capability. But the hardware does isolate FF5xxx functions as though it had an ACS capability and PCI_ACS_RR and PCI_ACS_CR were set in the ACS Control register, i.e., all peer-to-peer traffic is directed upstream instead of being routed internally. Add ACS quirk for FF5xxx NICs in pci_quirk_wangxun_nic_acs() so the functions can be in independent IOMMU groups. Link: https://lore.kernel.org/r/E16053DB2B80E9A5+20241115024604.30493-1-mengyuanlou@net-swift.com Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
1 parent 9852d85 commit aa46a37

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

drivers/pci/quirks.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4996,18 +4996,21 @@ static int pci_quirk_brcm_acs(struct pci_dev *dev, u16 acs_flags)
49964996
}
49974997

49984998
/*
4999-
* Wangxun 10G/1G NICs have no ACS capability, and on multi-function
5000-
* devices, peer-to-peer transactions are not be used between the functions.
5001-
* So add an ACS quirk for below devices to isolate functions.
4999+
* Wangxun 40G/25G/10G/1G NICs have no ACS capability, but on
5000+
* multi-function devices, the hardware isolates the functions by
5001+
* directing all peer-to-peer traffic upstream as though PCI_ACS_RR and
5002+
* PCI_ACS_CR were set.
50025003
* SFxxx 1G NICs(em).
50035004
* RP1000/RP2000 10G NICs(sp).
5005+
* FF5xxx 40G/25G/10G NICs(aml).
50045006
*/
50055007
static int pci_quirk_wangxun_nic_acs(struct pci_dev *dev, u16 acs_flags)
50065008
{
50075009
switch (dev->device) {
5008-
case 0x0100 ... 0x010F:
5009-
case 0x1001:
5010-
case 0x2001:
5010+
case 0x0100 ... 0x010F: /* EM */
5011+
case 0x1001: case 0x2001: /* SP */
5012+
case 0x5010: case 0x5025: case 0x5040: /* AML */
5013+
case 0x5110: case 0x5125: case 0x5140: /* AML */
50115014
return pci_acs_ctrl_enabled(acs_flags,
50125015
PCI_ACS_SV | PCI_ACS_RR | PCI_ACS_CR | PCI_ACS_UF);
50135016
}

0 commit comments

Comments
 (0)