]> www.infradead.org Git - users/jedix/linux-maple.git/commit
PCI: Set SR-IOV NumVFs to zero after enumeration
authorBjorn Helgaas <bhelgaas@google.com>
Mon, 26 Oct 2015 03:43:22 +0000 (12:43 +0900)
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>
Fri, 13 Nov 2015 17:23:50 +0000 (09:23 -0800)
commit82022e587c851d0dc8142fdaa3d34bd8a349f951
treeb8cf31bf215ff7ebf1fdf9fb5b0ac02f7e010f3c
parent5060d421f203ed08e27732e76b68b648ba86496e
PCI: Set SR-IOV NumVFs to zero after enumeration

Orabug: 21547430

The enumeration path should leave NumVFs set to zero.  But after
4449f079722c ("PCI: Calculate maximum number of buses required for VFs"),
we call virtfn_max_buses() in the enumeration path, which changes NumVFs.
This NumVFs change is visible via lspci and sysfs until a driver enables
SR-IOV.

Set NumVFs to zero after virtfn_max_buses() computes the maximum number of
buses.

Fixes: 4449f079722c ("PCI: Calculate maximum number of buses required for VFs")
Based-on-patch-by: Ethan Zhao <ethan.zhao@oracle.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
drivers/pci/iov.c