diff options
author | 2016-09-07 19:57:50 +0530 | |
---|---|---|
committer | 2016-09-07 22:44:55 -0700 | |
commit | f72099e057c0b3ea3cfd16301cff9202c4db8ef4 (patch) | |
tree | c1534c187847d8781232b24232e95dd948d32e52 /drivers/net/ethernet/emulex | |
parent | be2net: Support UE recovery in BEx/Skyhawk adapters (diff) | |
download | linux-f72099e057c0b3ea3cfd16301cff9202c4db8ef4.tar.gz linux-f72099e057c0b3ea3cfd16301cff9202c4db8ef4.tar.bz2 linux-f72099e057c0b3ea3cfd16301cff9202c4db8ef4.zip |
be2net: Issue COMMON_RESET_FUNCTION cmd during driver unload
As per SLI guideline, drivers need to issue COMMON_RESET_FUNCTION SLI
cmd during driver unload to clean up any non-persistent state
information.
Issue this cmd only if VFs are not assigned to VMs as it is possible
for PF driver to unload while it\'s VF remains functional and assigned
to a VM.
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/emulex')
-rw-r--r-- | drivers/net/ethernet/emulex/benet/be_main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index 3be5d61aa875..95d2fa3de035 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c @@ -5706,6 +5706,9 @@ static void be_remove(struct pci_dev *pdev) be_clear(adapter); + if (!pci_vfs_assigned(adapter->pdev)) + be_cmd_reset_function(adapter); + /* tell fw we're done with firing cmds */ be_cmd_fw_clean(adapter); |