Commit 5cdd50dc authored by Bjorn Helgaas's avatar Bjorn Helgaas
Browse files

Merge branch 'pci/virtualization'

- Add ACS quirk for Wangxun FF5xxx NICs, which don't advertise and ACS
  capability but do isolate functions as though PCI_ACS_RR and PCI_ACS_CR
  were set, so the functions can be in independent IOMMU groups (Mengyuan
  Lou)

* pci/virtualization:
  PCI: Add ACS quirk for Wangxun FF5xxx NICs
parents ab02bafc aa46a373
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -4995,18 +4995,21 @@ static int pci_quirk_brcm_acs(struct pci_dev *dev, u16 acs_flags)
}

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