linux_dsm_epyc7002/drivers/net/ethernet/sfc
Daniel Pieczko 6598dad26b sfc: leak vports if a VF is assigned during PF unload
If any VF is assigned as the PF is unloaded, do not attempt to
remove its vport or the vswitch.  These will be removed if the
driver binds to the PF again, as an entity reset occurs during
probe.

A 'force' flag is added to efx_ef10_pci_sriov_disable() to
distinguish between disabling SR-IOV and driver unload.
SR-IOV cannot be disabled if VFs are assigned to guests.

If the PF driver is unloaded while VFs are assigned, the driver
may try to bind to the VF again at a later point if the driver
has been reloaded and the VF returns to the same domain as the PF.
In this case, the PF will not have a VF data structure, so the VF
can check this and drop out of probe early.

In this case, efx->vf_count will be zero but VFs will be present.
The user is advised to remove the VF and re-create it. The check
at the beginning of efx_ef10_pci_sriov_disable() that
efx->vf_count is non-zero is removed to allow SR-IOV to be
disabled in this case. Also, if the PF driver is unloaded, it
will disable SR-IOV to remove these unknown VFs.

By not disabling bus-mastering if VFs are still assigned, the VF
will continue to pass traffic after the PF has been removed.

When using the max_vfs module parameter, if VFs are already
present do not try to initialise any more.

Signed-off-by: Shradha Shah <sshah@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-06-02 12:57:32 -07:00
..
bitfield.h
ef10_regs.h
ef10_sriov.c sfc: leak vports if a VF is assigned during PF unload 2015-06-02 12:57:32 -07:00
ef10_sriov.h sfc: leak vports if a VF is assigned during PF unload 2015-06-02 12:57:32 -07:00
ef10.c sfc: leak vports if a VF is assigned during PF unload 2015-06-02 12:57:32 -07:00
efx.c sfc: leak vports if a VF is assigned during PF unload 2015-06-02 12:57:32 -07:00
efx.h sfc: add ndo_set_vf_mac() function for EF10 2015-05-21 18:43:54 -04:00
enum.h sfc: Change entity reset on MC reboot to a new datapath-only reset. 2015-05-21 18:43:54 -04:00
ethtool.c sfc: protect filter table against use-after-free 2015-05-21 18:43:53 -04:00
falcon_boards.c
falcon.c sfc: Bind the sfc driver to any available VF's 2015-05-09 16:16:48 -04:00
farch_regs.h
farch.c
filter.h
io.h
Kconfig sfc: add sysfs entry to control MCDI tracing 2015-05-27 13:54:51 -04:00
Makefile sfc: Enable VF's via a write to the sysfs file sriov_numvfs 2015-05-09 16:16:46 -04:00
mcdi_mon.c
mcdi_pcol.h sfc: suppress vadaptor stats when EVB is not present 2015-06-02 12:57:29 -07:00
mcdi_port.c sfc: suppress ENOENT error messages from MC_CMD_MAC_STATS 2015-06-02 12:57:29 -07:00
mcdi.c sfc: add module parameter to enable MCDI logging on new functions 2015-05-27 13:54:51 -04:00
mcdi.h sfc: add sysfs entry to control MCDI tracing 2015-05-27 13:54:51 -04:00
mdio_10g.c
mdio_10g.h
mtd.c
net_driver.h sfc: Implement ndo_gets_phys_port_id() for EF10 VFs 2015-06-02 12:57:26 -07:00
nic.c
nic.h sfc: display vadaptor statistics for all interfaces 2015-06-02 12:57:28 -07:00
phy.h
ptp.c sfc: Initialise MCDI buffers to 0 on declaration. 2015-05-21 18:43:53 -04:00
qt202x_phy.c
rx.c sfc: free multiple Rx buffers when required 2015-05-31 17:36:20 -07:00
selftest.c
selftest.h
siena_sriov.c sfc: save old MAC address in case sriov_mac_address_changed fails 2015-05-21 18:43:53 -04:00
siena_sriov.h sfc: save old MAC address in case sriov_mac_address_changed fails 2015-05-21 18:43:53 -04:00
siena.c sfc: set the MAC address using MC_CMD_VADAPTOR_SET_MAC 2015-05-21 18:43:55 -04:00
sriov.c sfc: Implement ndo_gets_phys_port_id() for EF10 VFs 2015-06-02 12:57:26 -07:00
sriov.h sfc: Implement ndo_gets_phys_port_id() for EF10 VFs 2015-06-02 12:57:26 -07:00
tenxpress.c
tx.c
txc43128_phy.c
vfdi.h
workarounds.h