diff options
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c index e8ed78f64007..fd20a4ff0150 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | |||
@@ -2934,9 +2934,9 @@ int bnx2x_nic_unload(struct bnx2x *bp, int unload_mode, bool keep_link) | |||
2934 | bnx2x_free_fp_mem_cnic(bp); | 2934 | bnx2x_free_fp_mem_cnic(bp); |
2935 | 2935 | ||
2936 | if (IS_PF(bp)) { | 2936 | if (IS_PF(bp)) { |
2937 | bnx2x_free_mem(bp); | ||
2938 | if (CNIC_LOADED(bp)) | 2937 | if (CNIC_LOADED(bp)) |
2939 | bnx2x_free_mem_cnic(bp); | 2938 | bnx2x_free_mem_cnic(bp); |
2939 | bnx2x_free_mem(bp); | ||
2940 | } | 2940 | } |
2941 | bp->state = BNX2X_STATE_CLOSED; | 2941 | bp->state = BNX2X_STATE_CLOSED; |
2942 | bp->cnic_loaded = false; | 2942 | bp->cnic_loaded = false; |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index a46bc720b992..dedf68377e74 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | |||
@@ -7786,7 +7786,7 @@ int bnx2x_alloc_mem_cnic(struct bnx2x *bp) | |||
7786 | sizeof(struct | 7786 | sizeof(struct |
7787 | host_hc_status_block_e1x)); | 7787 | host_hc_status_block_e1x)); |
7788 | 7788 | ||
7789 | if (CONFIGURE_NIC_MODE(bp)) | 7789 | if (CONFIGURE_NIC_MODE(bp) && !bp->t2) |
7790 | /* allocate searcher T2 table, as it wan't allocated before */ | 7790 | /* allocate searcher T2 table, as it wan't allocated before */ |
7791 | BNX2X_PCI_ALLOC(bp->t2, &bp->t2_mapping, SRC_T2_SZ); | 7791 | BNX2X_PCI_ALLOC(bp->t2, &bp->t2_mapping, SRC_T2_SZ); |
7792 | 7792 | ||
@@ -7809,7 +7809,7 @@ int bnx2x_alloc_mem(struct bnx2x *bp) | |||
7809 | { | 7809 | { |
7810 | int i, allocated, context_size; | 7810 | int i, allocated, context_size; |
7811 | 7811 | ||
7812 | if (!CONFIGURE_NIC_MODE(bp)) | 7812 | if (!CONFIGURE_NIC_MODE(bp) && !bp->t2) |
7813 | /* allocate searcher T2 table */ | 7813 | /* allocate searcher T2 table */ |
7814 | BNX2X_PCI_ALLOC(bp->t2, &bp->t2_mapping, SRC_T2_SZ); | 7814 | BNX2X_PCI_ALLOC(bp->t2, &bp->t2_mapping, SRC_T2_SZ); |
7815 | 7815 | ||