diff options
author | Ariel Elior <ariele@broadcom.com> | 2013-08-28 01:13:03 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-08-27 22:03:04 -0400 |
commit | b4cddbd6dd9b3b9e08c26d8b7247e4e011092117 (patch) | |
tree | 778f0b97b2ca1dcfe696b65caca867486b5a0b42 /drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | |
parent | 35a04aa35c2929f24c7f063f42b6d776ad848c24 (diff) | |
download | op-kernel-dev-b4cddbd6dd9b3b9e08c26d8b7247e4e011092117.zip op-kernel-dev-b4cddbd6dd9b3b9e08c26d8b7247e4e011092117.tar.gz |
bnx2x: Fix VF memory leak unload
Due to incorrect VF/PF conditions, when unloading a VF it will not release
part of the memory it has previously allocated.
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@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.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c index 26b4dfc..0cc2611 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c @@ -2962,8 +2962,9 @@ int bnx2x_nic_unload(struct bnx2x *bp, int unload_mode, bool keep_link) if (IS_PF(bp)) { if (CNIC_LOADED(bp)) bnx2x_free_mem_cnic(bp); - bnx2x_free_mem(bp); } + bnx2x_free_mem(bp); + bp->state = BNX2X_STATE_CLOSED; bp->cnic_loaded = false; |