Skip to content

Commit

Permalink
be2net: Cleanup the VF interface handles
Browse files Browse the repository at this point in the history
The PF needs to cleanup all the interface handles that it created for the VFs.

Signed-off-by: Ajit Khaparde <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Ajit Khaparde authored and davem330 committed Feb 12, 2011
1 parent e631936 commit 7ab8b0b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/net/benet/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2340,13 +2340,22 @@ static int be_setup(struct be_adapter *adapter)

static int be_clear(struct be_adapter *adapter)
{
int vf;

if (be_physfn(adapter) && adapter->sriov_enabled)
be_vf_eth_addr_rem(adapter);

be_mcc_queues_destroy(adapter);
be_rx_queues_destroy(adapter);
be_tx_queues_destroy(adapter);

if (be_physfn(adapter) && adapter->sriov_enabled)
for (vf = 0; vf < num_vfs; vf++)
if (adapter->vf_cfg[vf].vf_if_handle)
be_cmd_if_destroy(adapter,
adapter->vf_cfg[vf].vf_if_handle,
vf + 1);

be_cmd_if_destroy(adapter, adapter->if_handle, 0);

/* tell fw we're done with firing cmds */
Expand Down

0 comments on commit 7ab8b0b

Please sign in to comment.