summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
diff options
context:
space:
mode:
authorAriel Elior2013-01-01 06:22:28 +0100
committerDavid S. Miller2013-01-02 10:45:05 +0100
commit9b176b6b63ed07472c26b6833a0ac23b373e6bf8 (patch)
tree69c2761456b08b9ef2fdfa4077e2c439c7fd0b82 /drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
parentbnx2x: Add init, setup_q, set_mac to VF <-> PF channel (diff)
downloadkernel-qcow2-linux-9b176b6b63ed07472c26b6833a0ac23b373e6bf8.tar.gz
kernel-qcow2-linux-9b176b6b63ed07472c26b6833a0ac23b373e6bf8.tar.xz
kernel-qcow2-linux-9b176b6b63ed07472c26b6833a0ac23b373e6bf8.zip
bnx2x: Add teardown_q and close to VF <-> PF channel
When a VF is being closed its queues are released via the 'teardown_q' and the VF itself is closed with 'close'. These are essentially the unload counterparts of 'init' and 'setup_q' from the load flow. Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
index f7b23c26f3e8..362451d6033a 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@ -2790,8 +2790,13 @@ int bnx2x_nic_unload(struct bnx2x *bp, int unload_mode, bool keep_link)
/* wait till consumers catch up with producers in all queues */
bnx2x_drain_tx_queues(bp);
- /* Cleanup the chip if needed */
- if (unload_mode != UNLOAD_RECOVERY)
+ /* if VF indicate to PF this function is going down (PF will delete sp
+ * elements and clear initializations
+ */
+ if (IS_VF(bp))
+ bnx2x_vfpf_close_vf(bp);
+ else if (unload_mode != UNLOAD_RECOVERY)
+ /* if this is a normal/close unload need to clean up chip*/
bnx2x_chip_cleanup(bp, unload_mode, keep_link);
else {
/* Send the UNLOAD_REQUEST to the MCP */