All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iov: initialize NumVFs register to 0 at the end of sriov_init()
@ 2015-08-21  9:51 Ethan Zhao
  2015-09-15 16:10 ` Bjorn Helgaas
  0 siblings, 1 reply; 3+ messages in thread
From: Ethan Zhao @ 2015-08-21  9:51 UTC (permalink / raw)
  To: bhelgaas; +Cc: linux-pci, linux-kernel, Ethan Zhao

After commit 4449f079722c ("PCI: Calculate maximum number of buses
required for VFs"),the initial value of NumVFs register was set to
non-zero after sriov_init() and no VFs was enabled in device driver.
this changed the behaviour of kernel exported by lspci and sysfs etc.
so this patch initialize the NumVFs register to zero after the
calculation of max_VF_buses was done.

Tested on stable 4.1 and passed building on stable 4.2-rc7

Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
Tested-by: Sriharsha Yadagudde <sriharsha.devdas@oracle.com>
---
 drivers/pci/iov.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c
index ee0ebff..6969084 100644
--- a/drivers/pci/iov.c
+++ b/drivers/pci/iov.c
@@ -476,6 +476,7 @@ found:
 	dev->is_physfn = 1;
 	iov->max_VF_buses = virtfn_max_buses(dev);
 
+	pci_iov_set_numvfs(dev, 0);
 	return 0;
 
 failed:
-- 
1.8.3.1


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

end of thread, other threads:[~2015-09-16  1:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-21  9:51 [PATCH] iov: initialize NumVFs register to 0 at the end of sriov_init() Ethan Zhao
2015-09-15 16:10 ` Bjorn Helgaas
2015-09-16  1:01   ` ethan zhao

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.