aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2009-12-03 04:46:33 -0500
committerDavid S. Miller <davem@davemloft.net>2009-12-03 16:18:11 -0500
commitb929e53cb7796a8abe47174dfdfdf90cbb65a8bf (patch)
treed98894dfe256ff8b23761a6fc3398c0defcfe412 /drivers
parent20175c57f23cde2049c509eb00a2f9d373478107 (diff)
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')
-rw-r--r--drivers/net/bnx2.c12
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)
5158 5158
5159 ring_prod = prod = rxr->rx_pg_prod; 5159 ring_prod = prod = rxr->rx_pg_prod;
5160 for (i = 0; i < bp->rx_pg_ring_size; i++) { 5160 for (i = 0; i < bp->rx_pg_ring_size; i++) {
5161 if (bnx2_alloc_rx_page(bp, rxr, ring_prod) < 0) 5161 if (bnx2_alloc_rx_page(bp, rxr, ring_prod) < 0) {
5162 printk(KERN_WARNING PFX "%s: init'ed rx page ring %d "
5163 "with %d/%d pages only\n",
5164 bp->dev->name, ring_num, i, bp->rx_pg_ring_size);
5162 break; 5165 break;
5166 }
5163 prod = NEXT_RX_BD(prod); 5167 prod = NEXT_RX_BD(prod);
5164 ring_prod = RX_PG_RING_IDX(prod); 5168 ring_prod = RX_PG_RING_IDX(prod);
5165 } 5169 }
@@ -5167,8 +5171,12 @@ bnx2_init_rx_ring(struct bnx2 *bp, int ring_num)
5167 5171
5168 ring_prod = prod = rxr->rx_prod; 5172 ring_prod = prod = rxr->rx_prod;
5169 for (i = 0; i < bp->rx_ring_size; i++) { 5173 for (i = 0; i < bp->rx_ring_size; i++) {
5170 if (bnx2_alloc_rx_skb(bp, rxr, ring_prod) < 0) 5174 if (bnx2_alloc_rx_skb(bp, rxr, ring_prod) < 0) {
5175 printk(KERN_WARNING PFX "%s: init'ed rx ring %d with "
5176 "%d/%d skbs only\n",
5177 bp->dev->name, ring_num, i, bp->rx_ring_size);
5171 break; 5178 break;
5179 }
5172 prod = NEXT_RX_BD(prod); 5180 prod = NEXT_RX_BD(prod);
5173 ring_prod = RX_RING_IDX(prod); 5181 ring_prod = RX_RING_IDX(prod);
5174 } 5182 }