linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: Don't update VF's BAR
@ 2015-06-30  7:37 Wei Yang
  2015-07-14 22:15 ` Bjorn Helgaas
  0 siblings, 1 reply; 6+ messages in thread
From: Wei Yang @ 2015-06-30  7:37 UTC (permalink / raw)
  To: linux-pci, bhelgaas; +Cc: Wei Yang

VF BARs are RO zero, so updating VF BARs will not take any effect.
See the SR-IOV spec r1.1, sec 3.4.1.11.

Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
---
 drivers/pci/setup-res.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c
index 232f925..334b394 100644
--- a/drivers/pci/setup-res.c
+++ b/drivers/pci/setup-res.c
@@ -37,6 +37,13 @@ void pci_update_resource(struct pci_dev *dev, int resno)
 	struct resource *res = dev->resource + resno;
 
 	/*
+	 * Per SRIOV SPEC 3.4.1.11, VF BARs are RO zero.
+	 * If this is a VF, just return.
+	 */
+	if (dev->is_virtfn)
+		return;
+
+	/*
 	 * Ignore resources for unimplemented BARs and unused resource slots
 	 * for 64 bit BARs.
 	 */
-- 
1.7.9.5


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

end of thread, other threads:[~2015-08-28  3:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-30  7:37 [PATCH] PCI: Don't update VF's BAR Wei Yang
2015-07-14 22:15 ` Bjorn Helgaas
2015-07-15  1:38   ` Wei Yang
2015-07-29  8:52   ` [PATCH v2] " Wei Yang
2015-08-27 17:27     ` Bjorn Helgaas
2015-08-28  3:51       ` Richard Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).