aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000
diff options
context:
space:
mode:
authorJeff Kirsher <jeffrey.t.kirsher@intel.com>2006-03-02 21:20:17 -0500
committerroot <root@jk-desktop.jf.intel.com>2006-03-02 21:20:17 -0500
commit9f68788856b134f93d9d10b19aa902924c61fc02 (patch)
tree84607dc7136b5e003f31ccab24ff9cdffb1510a5 /drivers/net/e1000
parent329bfd0b6d5ffec00b787f1d0e68eef63d8b1d56 (diff)
e1000: Add 82573 controller support to TSO fix
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com>
Diffstat (limited to 'drivers/net/e1000')
-rw-r--r--drivers/net/e1000/e1000_main.c30
1 files changed, 19 insertions, 11 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 9e58419c8729..6603bd139064 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -2796,21 +2796,29 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
2796 max_per_txd = min(mss << 2, max_per_txd); 2796 max_per_txd = min(mss << 2, max_per_txd);
2797 max_txd_pwr = fls(max_per_txd) - 1; 2797 max_txd_pwr = fls(max_per_txd) - 1;
2798 2798
2799 /* TSO Workaround for 82571/2 Controllers -- if skb->data 2799 /* TSO Workaround for 82571/2/3 Controllers -- if skb->data
2800 * points to just header, pull a few bytes of payload from 2800 * points to just header, pull a few bytes of payload from
2801 * frags into skb->data */ 2801 * frags into skb->data */
2802 hdr_len = ((skb->h.raw - skb->data) + (skb->h.th->doff << 2)); 2802 hdr_len = ((skb->h.raw - skb->data) + (skb->h.th->doff << 2));
2803 if (skb->data_len && (hdr_len == (skb->len - skb->data_len)) && 2803 if (skb->data_len && (hdr_len == (skb->len - skb->data_len))) {
2804 (adapter->hw.mac_type == e1000_82571 || 2804 switch (adapter->hw.mac_type) {
2805 adapter->hw.mac_type == e1000_82572)) { 2805 unsigned int pull_size;
2806 unsigned int pull_size; 2806 case e1000_82571:
2807 pull_size = min((unsigned int)4, skb->data_len); 2807 case e1000_82572:
2808 if (!__pskb_pull_tail(skb, pull_size)) { 2808 case e1000_82573:
2809 printk(KERN_ERR "__pskb_pull_tail failed.\n"); 2809 pull_size = min((unsigned int)4, skb->data_len);
2810 dev_kfree_skb_any(skb); 2810 if (!__pskb_pull_tail(skb, pull_size)) {
2811 return -EFAULT; 2811 printk(KERN_ERR
2812 "__pskb_pull_tail failed.\n");
2813 dev_kfree_skb_any(skb);
2814 return -EFAULT;
2815 }
2816 len = skb->len - skb->data_len;
2817 break;
2818 default:
2819 /* do nothing */
2820 break;
2812 } 2821 }
2813 len = skb->len - skb->data_len;
2814 } 2822 }
2815 } 2823 }
2816 2824