Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 18791
b: refs/heads/master
c: 9a3056d
h: refs/heads/master
i:
  18789: 5ca451c
  18787: 534859e
  18783: 72a6b55
v: v3
  • Loading branch information
Jeff Kirsher authored and Jeff Garzik committed Jan 17, 2006
1 parent 9b7ab0d commit fe08acd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 20 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: 4ee9c02007249cf9c66e368b5d433c6956e05586
refs/heads/master: 9a3056da0d7fde1e19e806824c41857b239954ed
37 changes: 18 additions & 19 deletions trunk/drivers/net/e1000/e1000_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2688,11 +2688,23 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
* overrun the FIFO, adjust the max buffer len if mss
* drops. */
if(mss) {
uint8_t hdr_len;
max_per_txd = min(mss << 2, max_per_txd);
max_txd_pwr = fls(max_per_txd) - 1;

/* TSO Workaround for 82571/2 Controllers -- if skb->data
* points to just header, pull a few bytes of payload from
* frags into skb->data */
hdr_len = ((skb->h.raw - skb->data) + (skb->h.th->doff << 2));
if (skb->data_len && (hdr_len == (skb->len - skb->data_len)) &&
(adapter->hw.mac_type == e1000_82571 ||
adapter->hw.mac_type == e1000_82572)) {
len = skb->len - skb->data_len;
}
}

if((mss) || (skb->ip_summed == CHECKSUM_HW))
/* reserve a descriptor for the offload context */
count++;
count++;
#else
Expand Down Expand Up @@ -2726,26 +2738,13 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
if(adapter->pcix_82544)
count += nr_frags;

#ifdef NETIF_F_TSO
/* TSO Workaround for 82571/2 Controllers -- if skb->data
* points to just header, pull a few bytes of payload from
* frags into skb->data */
if (skb_shinfo(skb)->tso_size) {
uint8_t hdr_len;
hdr_len = ((skb->h.raw - skb->data) + (skb->h.th->doff << 2));
if (skb->data_len && (hdr_len < (skb->len - skb->data_len)) &&
(adapter->hw.mac_type == e1000_82571 ||
adapter->hw.mac_type == e1000_82572)) {
unsigned int pull_size;
pull_size = min((unsigned int)4, skb->data_len);
if (!__pskb_pull_tail(skb, pull_size)) {
printk(KERN_ERR "__pskb_pull_tail failed.\n");
dev_kfree_skb_any(skb);
return -EFAULT;
}
unsigned int pull_size;
pull_size = min((unsigned int)4, skb->data_len);
if (!__pskb_pull_tail(skb, pull_size)) {
printk(KERN_ERR "__pskb_pull_tail failed.\n");
dev_kfree_skb_any(skb);
return -EFAULT;
}
}
#endif

if(adapter->hw.tx_pkt_filtering && (adapter->hw.mac_type == e1000_82573) )
e1000_transfer_dhcp_info(adapter, skb);
Expand Down

0 comments on commit fe08acd

Please sign in to comment.