Skip to content

Commit

Permalink
be2net: Issue COMMON_RESET_FUNCTION cmd during driver unload
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Somnath Kotur authored and David S. Miller committed Sep 8, 2016
1 parent 710f3e5 commit f72099e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/ethernet/emulex/benet/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit f72099e

Please sign in to comment.