aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/tg3.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 09e3af0d1743..c38143b7b600 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -6087,31 +6087,31 @@ static int tg3_rx_prodring_alloc(struct tg3 *tp,
6087 6087
6088 memset(tpr->rx_jmb, 0, TG3_RX_JUMBO_RING_BYTES); 6088 memset(tpr->rx_jmb, 0, TG3_RX_JUMBO_RING_BYTES);
6089 6089
6090 if (tp->tg3_flags & TG3_FLAG_JUMBO_RING_ENABLE) { 6090 if (!(tp->tg3_flags & TG3_FLAG_JUMBO_RING_ENABLE))
6091 for (i = 0; i < TG3_RX_JUMBO_RING_SIZE; i++) { 6091 goto done;
6092 struct tg3_rx_buffer_desc *rxd;
6093
6094 rxd = &tpr->rx_jmb[i].std;
6095 rxd->idx_len = TG3_RX_JMB_DMA_SZ << RXD_LEN_SHIFT;
6096 rxd->type_flags = (RXD_FLAG_END << RXD_FLAGS_SHIFT) |
6097 RXD_FLAG_JUMBO;
6098 rxd->opaque = (RXD_OPAQUE_RING_JUMBO |
6099 (i << RXD_OPAQUE_INDEX_SHIFT));
6100 }
6101 6092
6102 for (i = 0; i < tp->rx_jumbo_pending; i++) { 6093 for (i = 0; i < TG3_RX_JUMBO_RING_SIZE; i++) {
6103 if (tg3_alloc_rx_skb(tp, tpr, RXD_OPAQUE_RING_JUMBO, 6094 struct tg3_rx_buffer_desc *rxd;
6104 i) < 0) { 6095
6105 printk(KERN_WARNING PFX 6096 rxd = &tpr->rx_jmb[i].std;
6106 "%s: Using a smaller RX jumbo ring, " 6097 rxd->idx_len = TG3_RX_JMB_DMA_SZ << RXD_LEN_SHIFT;
6107 "only %d out of %d buffers were " 6098 rxd->type_flags = (RXD_FLAG_END << RXD_FLAGS_SHIFT) |
6108 "allocated successfully.\n", 6099 RXD_FLAG_JUMBO;
6109 tp->dev->name, i, tp->rx_jumbo_pending); 6100 rxd->opaque = (RXD_OPAQUE_RING_JUMBO |
6110 if (i == 0) 6101 (i << RXD_OPAQUE_INDEX_SHIFT));
6111 goto initfail; 6102 }
6112 tp->rx_jumbo_pending = i; 6103
6113 break; 6104 for (i = 0; i < tp->rx_jumbo_pending; i++) {
6114 } 6105 if (tg3_alloc_rx_skb(tp, tpr, RXD_OPAQUE_RING_JUMBO, i) < 0) {
6106 printk(KERN_WARNING PFX
6107 "%s: Using a smaller RX jumbo ring, "
6108 "only %d out of %d buffers were "
6109 "allocated successfully.\n",
6110 tp->dev->name, i, tp->rx_jumbo_pending);
6111 if (i == 0)
6112 goto initfail;
6113 tp->rx_jumbo_pending = i;
6114 break;
6115 } 6115 }
6116 } 6116 }
6117 6117