bnxt_en: More robust SRIOV cleanup sequence.
authorJeffrey Huang <huangjw@broadcom.com>
Thu, 5 Nov 2015 21:25:51 +0000 (16:25 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Nov 2015 21:33:09 +0000 (16:33 -0500)
commit4bb6cdce386d620d10d2588ea5bf4093a3b21ab9
treeee700f7eb3c31f92b3bcfd292e56c1891ea06982
parent84e86b98f6515aaeaac053b234be158b25457184
bnxt_en: More robust SRIOV cleanup sequence.

Instead of always calling pci_sriov_disable() in remove_one(),
the driver should detect whether VFs are currently assigned
to the VMs. If the VFs are active in VMs, then it should not
disable SRIOV as it is catastrophic to the VMs. Instead,
it just leaves the VFs alone and continues to unload the PF.
The user can then cleanup the VMs even after the PF driver
has been unloaded.

Signed-off-by: Jeffrey Huang <huangjw@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c