Commit 8784b4e0 authored by Andrew Morton's avatar Andrew Morton Committed by Stephen Hemminger

[PATCH] e1000 bug

Rick Lindsley <ricklind@us.ibm.com> wrote:
>
> since it's been out for a while you probably already know, but the patch
> for e1000_main.c has a bug in it.  Looks like it will fail at line 1550 if
> compiled with NETIF_F_TSO defined.
>

So it will.  I blame the gcc developers.

 25-akpm/drivers/net/e1000/e1000_main.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)
parent 4dccded3
......@@ -1536,19 +1536,24 @@ e1000_tx_map(struct e1000_adapter *adapter, struct sk_buff *skb,
struct e1000_buffer *buffer_info;
unsigned int len = skb->len, max_per_txd = E1000_MAX_DATA_PER_TXD;
unsigned int offset = 0, size, count = 0, i;
#ifdef NETIF_F_TSO
unsigned int mss;
#endif
unsigned int nr_frags;
unsigned int f;
#ifdef NETIF_F_TSO
unsigned int mss = skb_shinfo(skb)->tso_size;
mss = skb_shinfo(skb)->tso_size;
/* The controller does a simple calculation to
* make sure there is enough room in the FIFO before
* initiating the DMA for each buffer. The calc is:
* 4 = ceil(buffer len/mss). To make sure we don't
* overrun the FIFO, adjust the max buffer len if mss
* drops. */
if(mss) max_per_txd = min(mss << 2, max_per_txd);
if (mss)
max_per_txd = min(mss << 2, max_per_txd);
#endif
unsigned int nr_frags = skb_shinfo(skb)->nr_frags;
unsigned int f;
nr_frags = skb_shinfo(skb)->nr_frags;
len -= skb->data_len;
i = tx_ring->next_to_use;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment