]> err.no Git - linux-2.6/commitdiff
e1000: Add 82573 controller support to TSO fix
authorJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 3 Mar 2006 02:20:17 +0000 (18:20 -0800)
committerroot <root@jk-desktop.jf.intel.com>
Fri, 3 Mar 2006 02:20:17 +0000 (18:20 -0800)
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>
drivers/net/e1000/e1000_main.c

index 9e58419c8729c0825c69333d7b7e93f733ab1fd2..6603bd139064276d260f9f8b7ef08d97bbc119ba 100644 (file)
@@ -2796,21 +2796,29 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
                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
+       /* TSO Workaround for 82571/2/3 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)) {
-                       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;
+               if (skb->data_len && (hdr_len == (skb->len - skb->data_len))) {
+                       switch (adapter->hw.mac_type) {
+                               unsigned int pull_size;
+                       case e1000_82571:
+                       case e1000_82572:
+                       case e1000_82573:
+                               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;
+                               }
+                               len = skb->len - skb->data_len;
+                               break;
+                       default:
+                               /* do nothing */
+                               break;
                        }
-                       len = skb->len - skb->data_len;
                }
        }