aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tg3.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r--drivers/net/tg3.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 9251bb523e9e..00e7e14fd3f7 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -4408,11 +4408,9 @@ static void tg3_tx(struct tg3_napi *tnapi)
4408 * buffers the cpu only reads the last cacheline of the RX descriptor 4408 * buffers the cpu only reads the last cacheline of the RX descriptor
4409 * (to fetch the error flags, vlan tag, checksum, and opaque cookie). 4409 * (to fetch the error flags, vlan tag, checksum, and opaque cookie).
4410 */ 4410 */
4411static int tg3_alloc_rx_skb(struct tg3_napi *tnapi, 4411static int tg3_alloc_rx_skb(struct tg3 *tp, struct tg3_rx_prodring_set *tpr,
4412 struct tg3_rx_prodring_set *tpr,
4413 u32 opaque_key, u32 dest_idx_unmasked) 4412 u32 opaque_key, u32 dest_idx_unmasked)
4414{ 4413{
4415 struct tg3 *tp = tnapi->tp;
4416 struct tg3_rx_buffer_desc *desc; 4414 struct tg3_rx_buffer_desc *desc;
4417 struct ring_info *map, *src_map; 4415 struct ring_info *map, *src_map;
4418 struct sk_buff *skb; 4416 struct sk_buff *skb;
@@ -4601,7 +4599,7 @@ static int tg3_rx(struct tg3_napi *tnapi, int budget)
4601 ) { 4599 ) {
4602 int skb_size; 4600 int skb_size;
4603 4601
4604 skb_size = tg3_alloc_rx_skb(tnapi, tpr, opaque_key, 4602 skb_size = tg3_alloc_rx_skb(tp, tpr, opaque_key,
4605 *post_ptr); 4603 *post_ptr);
4606 if (skb_size < 0) 4604 if (skb_size < 0)
4607 goto drop_it; 4605 goto drop_it;
@@ -5744,7 +5742,6 @@ static int tg3_rx_prodring_alloc(struct tg3 *tp,
5744 struct tg3_rx_prodring_set *tpr) 5742 struct tg3_rx_prodring_set *tpr)
5745{ 5743{
5746 u32 i, rx_pkt_dma_sz; 5744 u32 i, rx_pkt_dma_sz;
5747 struct tg3_napi *tnapi = &tp->napi[0];
5748 5745
5749 /* Zero out all descriptors. */ 5746 /* Zero out all descriptors. */
5750 memset(tpr->rx_std, 0, TG3_RX_RING_BYTES); 5747 memset(tpr->rx_std, 0, TG3_RX_RING_BYTES);
@@ -5771,7 +5768,7 @@ static int tg3_rx_prodring_alloc(struct tg3 *tp,
5771 5768
5772 /* Now allocate fresh SKBs for each rx ring. */ 5769 /* Now allocate fresh SKBs for each rx ring. */
5773 for (i = 0; i < tp->rx_pending; i++) { 5770 for (i = 0; i < tp->rx_pending; i++) {
5774 if (tg3_alloc_rx_skb(tnapi, tpr, RXD_OPAQUE_RING_STD, i) < 0) { 5771 if (tg3_alloc_rx_skb(tp, tpr, RXD_OPAQUE_RING_STD, i) < 0) {
5775 printk(KERN_WARNING PFX 5772 printk(KERN_WARNING PFX
5776 "%s: Using a smaller RX standard ring, " 5773 "%s: Using a smaller RX standard ring, "
5777 "only %d out of %d buffers were allocated " 5774 "only %d out of %d buffers were allocated "
@@ -5802,7 +5799,7 @@ static int tg3_rx_prodring_alloc(struct tg3 *tp,
5802 } 5799 }
5803 5800
5804 for (i = 0; i < tp->rx_jumbo_pending; i++) { 5801 for (i = 0; i < tp->rx_jumbo_pending; i++) {
5805 if (tg3_alloc_rx_skb(tnapi, tpr, RXD_OPAQUE_RING_JUMBO, 5802 if (tg3_alloc_rx_skb(tp, tpr, RXD_OPAQUE_RING_JUMBO,
5806 i) < 0) { 5803 i) < 0) {
5807 printk(KERN_WARNING PFX 5804 printk(KERN_WARNING PFX
5808 "%s: Using a smaller RX jumbo ring, " 5805 "%s: Using a smaller RX jumbo ring, "