Commit 7ab8b0b4 authored by Ajit Khaparde's avatar Ajit Khaparde Committed by David S. Miller

be2net: Cleanup the VF interface handles

The PF needs to cleanup all the interface handles that it created for the VFs.
Signed-off-by: default avatarAjit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e6319365
...@@ -2340,6 +2340,8 @@ static int be_setup(struct be_adapter *adapter) ...@@ -2340,6 +2340,8 @@ static int be_setup(struct be_adapter *adapter)
static int be_clear(struct be_adapter *adapter) static int be_clear(struct be_adapter *adapter)
{ {
int vf;
if (be_physfn(adapter) && adapter->sriov_enabled) if (be_physfn(adapter) && adapter->sriov_enabled)
be_vf_eth_addr_rem(adapter); be_vf_eth_addr_rem(adapter);
...@@ -2347,6 +2349,13 @@ static int be_clear(struct be_adapter *adapter) ...@@ -2347,6 +2349,13 @@ static int be_clear(struct be_adapter *adapter)
be_rx_queues_destroy(adapter); be_rx_queues_destroy(adapter);
be_tx_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); be_cmd_if_destroy(adapter, adapter->if_handle, 0);
/* tell fw we're done with firing cmds */ /* tell fw we're done with firing cmds */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment