The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] pci/iov: VFs are never multifunction
@ 2014-01-09 15:36 Alex Williamson
  2014-01-09 18:08 ` Bjorn Helgaas
  2014-01-13 18:56 ` Bjorn Helgaas
  0 siblings, 2 replies; 8+ messages in thread
From: Alex Williamson @ 2014-01-09 15:36 UTC (permalink / raw)
  To: bhelgaas, linux-pci
  Cc: sathya.perla, linux-kernel, ajit.khaparde, ddutile,
	subbu.seetharaman, myron.stowe

Per the SR-IOV spec rev 1.1:

3.4.1.9 Header Type (Offset 0Eh)

"... For VFs, this register must be RO Zero."

Unfortunately some devices get this wrong, ex. Emulex OneConnect 10Gb
NIC.  When they do it makes us handle ACS testing and therefore IOMMU
groups as if they were actual multifunction devices and require ACS
capabilities to make sure there's no peer-to-peer between functions.
VFs are never traditional multifunction devices, so simply clear this
bit before we get any further into setup.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
---
 drivers/pci/iov.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c
index 1fe2d6f..e2fbb67 100644
--- a/drivers/pci/iov.c
+++ b/drivers/pci/iov.c
@@ -84,6 +84,7 @@ static int virtfn_add(struct pci_dev *dev, int id, int reset)
 	virtfn->dev.parent = dev->dev.parent;
 	virtfn->physfn = pci_dev_get(dev);
 	virtfn->is_virtfn = 1;
+	virtfn->multifunction = 0;
 
 	for (i = 0; i < PCI_SRIOV_NUM_BARS; i++) {
 		res = dev->resource + PCI_IOV_RESOURCES + i;


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-01-13 18:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-09 15:36 [PATCH] pci/iov: VFs are never multifunction Alex Williamson
2014-01-09 18:08 ` Bjorn Helgaas
2014-01-09 18:25   ` Alex Williamson
2014-01-09 21:39     ` Bjorn Helgaas
2014-01-09 21:58       ` Alex Williamson
2014-01-09 23:20         ` Bjorn Helgaas
2014-01-09 23:39           ` Alex Williamson
2014-01-13 18:56 ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox