diff options
author | Dmitry Kravkov <dmitry@broadcom.com> | 2011-06-13 21:32:47 -0400 |
---|---|---|
committer | David S. Miller <davem@conan.davemloft.net> | 2011-06-15 10:56:12 -0400 |
commit | 8eef2af1824da37b428ad34e7ff3490b327b39c1 (patch) | |
tree | d7c20bae080a2777b6a49fc1fdc89c62f9106302 /drivers/net/bnx2x/bnx2x_cmn.c | |
parent | 59e5137357559ec60b2e72bdc3d5a7e22c47212b (diff) |
bnx2x: do not allocate FCoE ring if disabled
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x/bnx2x_cmn.c')
-rw-r--r-- | drivers/net/bnx2x/bnx2x_cmn.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/net/bnx2x/bnx2x_cmn.c b/drivers/net/bnx2x/bnx2x_cmn.c index 831c6ec98eed..122cc295d7bf 100644 --- a/drivers/net/bnx2x/bnx2x_cmn.c +++ b/drivers/net/bnx2x/bnx2x_cmn.c | |||
@@ -2621,7 +2621,12 @@ static int bnx2x_alloc_fp_mem_at(struct bnx2x *bp, int index) | |||
2621 | #ifdef BCM_CNIC | 2621 | #ifdef BCM_CNIC |
2622 | } | 2622 | } |
2623 | #endif | 2623 | #endif |
2624 | set_sb_shortcuts(bp, index); | 2624 | |
2625 | /* FCoE Queue uses Default SB and doesn't ACK the SB, thus no need to | ||
2626 | * set shortcuts for it. | ||
2627 | */ | ||
2628 | if (!IS_FCOE_IDX(index)) | ||
2629 | set_sb_shortcuts(bp, index); | ||
2625 | 2630 | ||
2626 | /* Tx */ | 2631 | /* Tx */ |
2627 | if (!skip_tx_queue(bp, index)) { | 2632 | if (!skip_tx_queue(bp, index)) { |
@@ -2698,9 +2703,13 @@ int bnx2x_alloc_fp_mem(struct bnx2x *bp) | |||
2698 | if (bnx2x_alloc_fp_mem_at(bp, 0)) | 2703 | if (bnx2x_alloc_fp_mem_at(bp, 0)) |
2699 | return -ENOMEM; | 2704 | return -ENOMEM; |
2700 | #ifdef BCM_CNIC | 2705 | #ifdef BCM_CNIC |
2701 | /* FCoE */ | 2706 | if (!NO_FCOE(bp)) |
2702 | if (bnx2x_alloc_fp_mem_at(bp, FCOE_IDX)) | 2707 | /* FCoE */ |
2703 | return -ENOMEM; | 2708 | if (bnx2x_alloc_fp_mem_at(bp, FCOE_IDX)) |
2709 | /* we will fail load process instead of mark | ||
2710 | * NO_FCOE_FLAG | ||
2711 | */ | ||
2712 | return -ENOMEM; | ||
2704 | #endif | 2713 | #endif |
2705 | /* RSS */ | 2714 | /* RSS */ |
2706 | for_each_nondefault_eth_queue(bp, i) | 2715 | for_each_nondefault_eth_queue(bp, i) |