Commit b929e53c authored by Michael Chan's avatar Michael Chan Committed by David S. Miller

bnx2: Print warning when unable to allocate the full SKB/page ring.

Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
Signed-off-by: default avatarBenjamin Li <benli@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 20175c57
...@@ -5158,8 +5158,12 @@ bnx2_init_rx_ring(struct bnx2 *bp, int ring_num) ...@@ -5158,8 +5158,12 @@ bnx2_init_rx_ring(struct bnx2 *bp, int ring_num)
ring_prod = prod = rxr->rx_pg_prod; ring_prod = prod = rxr->rx_pg_prod;
for (i = 0; i < bp->rx_pg_ring_size; i++) { 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; break;
}
prod = NEXT_RX_BD(prod); prod = NEXT_RX_BD(prod);
ring_prod = RX_PG_RING_IDX(prod); ring_prod = RX_PG_RING_IDX(prod);
} }
...@@ -5167,8 +5171,12 @@ bnx2_init_rx_ring(struct bnx2 *bp, int ring_num) ...@@ -5167,8 +5171,12 @@ bnx2_init_rx_ring(struct bnx2 *bp, int ring_num)
ring_prod = prod = rxr->rx_prod; ring_prod = prod = rxr->rx_prod;
for (i = 0; i < bp->rx_ring_size; i++) { 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; break;
}
prod = NEXT_RX_BD(prod); prod = NEXT_RX_BD(prod);
ring_prod = RX_RING_IDX(prod); ring_prod = RX_RING_IDX(prod);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment