diff options
author | Michael Chan <mchan@broadcom.com> | 2009-12-03 09:46:33 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-03 13:18:11 -0800 |
commit | b929e53cb7796a8abe47174dfdfdf90cbb65a8bf (patch) | |
tree | d98894dfe256ff8b23761a6fc3398c0defcfe412 /drivers/net/bnx2.c | |
parent | 20175c57f23cde2049c509eb00a2f9d373478107 (diff) | |
download | blackbird-op-linux-b929e53cb7796a8abe47174dfdfdf90cbb65a8bf.tar.gz blackbird-op-linux-b929e53cb7796a8abe47174dfdfdf90cbb65a8bf.zip |
bnx2: Print warning when unable to allocate the full SKB/page ring.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r-- | drivers/net/bnx2.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 665253a3e73a..dba3840d7df9 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -5158,8 +5158,12 @@ bnx2_init_rx_ring(struct bnx2 *bp, int ring_num) ring_prod = prod = rxr->rx_pg_prod; for (i = 0; i < bp->rx_pg_ring_size; i++) { - if (bnx2_alloc_rx_page(bp, rxr, ring_prod) < 0) + if (bnx2_alloc_rx_page(bp, rxr, ring_prod) < 0) { + printk(KERN_WARNING PFX "%s: init'ed rx page ring %d " + "with %d/%d pages only\n", + bp->dev->name, ring_num, i, bp->rx_pg_ring_size); break; + } prod = NEXT_RX_BD(prod); ring_prod = RX_PG_RING_IDX(prod); } @@ -5167,8 +5171,12 @@ bnx2_init_rx_ring(struct bnx2 *bp, int ring_num) ring_prod = prod = rxr->rx_prod; for (i = 0; i < bp->rx_ring_size; i++) { - if (bnx2_alloc_rx_skb(bp, rxr, ring_prod) < 0) + if (bnx2_alloc_rx_skb(bp, rxr, ring_prod) < 0) { + printk(KERN_WARNING PFX "%s: init'ed rx ring %d with " + "%d/%d skbs only\n", + bp->dev->name, ring_num, i, bp->rx_ring_size); break; + } prod = NEXT_RX_BD(prod); ring_prod = RX_RING_IDX(prod); } |