Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 171567
b: refs/heads/master
c: 86b21e5
h: refs/heads/master
i:
  171565: 50ed927
  171563: 2a915cc
  171559: 0d73fd5
  171551: 99baf54
v: v3
  • Loading branch information
Matt Carlson authored and David S. Miller committed Nov 16, 2009
1 parent 2400ee7 commit 24821eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a3896167160ce9ad1eadeb88fd2f3971888444ae
refs/heads/master: 86b21e59c9a65c8e46d35ac6c4220f63639828c6
11 changes: 4 additions & 7 deletions trunk/drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -4408,11 +4408,9 @@ static void tg3_tx(struct tg3_napi *tnapi)
* buffers the cpu only reads the last cacheline of the RX descriptor
* (to fetch the error flags, vlan tag, checksum, and opaque cookie).
*/
static int tg3_alloc_rx_skb(struct tg3_napi *tnapi,
struct tg3_rx_prodring_set *tpr,
static int tg3_alloc_rx_skb(struct tg3 *tp, struct tg3_rx_prodring_set *tpr,
u32 opaque_key, u32 dest_idx_unmasked)
{
struct tg3 *tp = tnapi->tp;
struct tg3_rx_buffer_desc *desc;
struct ring_info *map, *src_map;
struct sk_buff *skb;
Expand Down Expand Up @@ -4601,7 +4599,7 @@ static int tg3_rx(struct tg3_napi *tnapi, int budget)
) {
int skb_size;

skb_size = tg3_alloc_rx_skb(tnapi, tpr, opaque_key,
skb_size = tg3_alloc_rx_skb(tp, tpr, opaque_key,
*post_ptr);
if (skb_size < 0)
goto drop_it;
Expand Down Expand Up @@ -5744,7 +5742,6 @@ static int tg3_rx_prodring_alloc(struct tg3 *tp,
struct tg3_rx_prodring_set *tpr)
{
u32 i, rx_pkt_dma_sz;
struct tg3_napi *tnapi = &tp->napi[0];

/* Zero out all descriptors. */
memset(tpr->rx_std, 0, TG3_RX_RING_BYTES);
Expand All @@ -5771,7 +5768,7 @@ static int tg3_rx_prodring_alloc(struct tg3 *tp,

/* Now allocate fresh SKBs for each rx ring. */
for (i = 0; i < tp->rx_pending; i++) {
if (tg3_alloc_rx_skb(tnapi, tpr, RXD_OPAQUE_RING_STD, i) < 0) {
if (tg3_alloc_rx_skb(tp, tpr, RXD_OPAQUE_RING_STD, i) < 0) {
printk(KERN_WARNING PFX
"%s: Using a smaller RX standard ring, "
"only %d out of %d buffers were allocated "
Expand Down Expand Up @@ -5802,7 +5799,7 @@ static int tg3_rx_prodring_alloc(struct tg3 *tp,
}

for (i = 0; i < tp->rx_jumbo_pending; i++) {
if (tg3_alloc_rx_skb(tnapi, tpr, RXD_OPAQUE_RING_JUMBO,
if (tg3_alloc_rx_skb(tp, tpr, RXD_OPAQUE_RING_JUMBO,
i) < 0) {
printk(KERN_WARNING PFX
"%s: Using a smaller RX jumbo ring, "
Expand Down

0 comments on commit 24821eb

Please sign in to comment.