]> git.baikalelectronics.ru Git - kernel.git/commit
sfc: force removal of VF and vport on driver removal
authorDaniel Pieczko <dpieczko@solarflare.com>
Tue, 2 Jun 2015 10:40:46 +0000 (11:40 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 2 Jun 2015 19:57:31 +0000 (12:57 -0700)
commit183da7e0bb117a96eb82d68fbd69029a27d48ccd
tree755bc26a4b1459bd9010f0cc6a4a370177244294
parent36b27da02d3a5364bf8444680dfb8f1b17aefcc9
sfc: force removal of VF and vport on driver removal

When the driver unloads, force the unbind and removal of any
VFs in the host with the PF.  The PF cannot remove vports and
vswitches if they are still being used by a VF driver, and when
unloading the sfc driver the removal order is not guaranteed,
so the instruction from the PF to the VF to unbind enforces a
suitable ordering so that vswitches and vports can be removed.

As a result of this, manually unbinding the driver from a single
PF will result in all of its VFs in the host also being removed.

Signed-off-by: Shradha Shah <sshah@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sfc/ef10_sriov.c
drivers/net/ethernet/sfc/efx.c