Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 265755
b: refs/heads/master
c: 81389f5
h: refs/heads/master
i:
  265753: 38fda9c
  265751: 7ecc83b
v: v3
  • Loading branch information
Matt Carlson authored and David S. Miller committed Sep 15, 2011
1 parent 52453c9 commit 51fe509
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 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: 7f23073515c83e8a7261462329b6f26f211126d7
refs/heads/master: 81389f57150ca84c9517a6ab2338f57badef4219
10 changes: 8 additions & 2 deletions trunk/drivers/net/ethernet/broadcom/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,12 @@ static inline void _tg3_flag_clear(enum TG3_FLAGS flag, unsigned long *bits)
#define TG3_RX_COPY_THRESH(tp) ((tp)->rx_copy_thresh)
#endif

#if (NET_IP_ALIGN != 0)
#define TG3_RX_OFFSET(tp) ((tp)->rx_offset)
#else
#define TG3_RX_OFFSET(tp) 0
#endif

/* minimum number of free TX descriptors required to wake up TX process */
#define TG3_TX_WAKEUP_THRESH(tnapi) ((tnapi)->tx_pending / 4)
#define TG3_TX_BD_DMA_MAX 4096
Expand Down Expand Up @@ -4984,11 +4990,11 @@ static int tg3_alloc_rx_skb(struct tg3 *tp, struct tg3_rx_prodring_set *tpr,
* Callers depend upon this behavior and assume that
* we leave everything unchanged if we fail.
*/
skb = netdev_alloc_skb(tp->dev, skb_size + tp->rx_offset);
skb = netdev_alloc_skb(tp->dev, skb_size + TG3_RX_OFFSET(tp));
if (skb == NULL)
return -ENOMEM;

skb_reserve(skb, tp->rx_offset);
skb_reserve(skb, TG3_RX_OFFSET(tp));

mapping = pci_map_single(tp->pdev, skb->data, skb_size,
PCI_DMA_FROMDEVICE);
Expand Down

0 comments on commit 51fe509

Please sign in to comment.