aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000/e1000_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/e1000/e1000_main.c')
-rw-r--r--drivers/net/e1000/e1000_main.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 2035ca4dc119..222fcd2d10de 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -990,16 +990,12 @@ e1000_probe(struct pci_dev *pdev,
990 netdev->features &= ~NETIF_F_HW_VLAN_FILTER; 990 netdev->features &= ~NETIF_F_HW_VLAN_FILTER;
991 } 991 }
992 992
993#ifdef NETIF_F_TSO
994 if ((adapter->hw.mac_type >= e1000_82544) && 993 if ((adapter->hw.mac_type >= e1000_82544) &&
995 (adapter->hw.mac_type != e1000_82547)) 994 (adapter->hw.mac_type != e1000_82547))
996 netdev->features |= NETIF_F_TSO; 995 netdev->features |= NETIF_F_TSO;
997 996
998#ifdef NETIF_F_TSO6
999 if (adapter->hw.mac_type > e1000_82547_rev_2) 997 if (adapter->hw.mac_type > e1000_82547_rev_2)
1000 netdev->features |= NETIF_F_TSO6; 998 netdev->features |= NETIF_F_TSO6;
1001#endif
1002#endif
1003 if (pci_using_dac) 999 if (pci_using_dac)
1004 netdev->features |= NETIF_F_HIGHDMA; 1000 netdev->features |= NETIF_F_HIGHDMA;
1005 1001
@@ -2626,7 +2622,6 @@ e1000_watchdog(unsigned long data)
2626 E1000_WRITE_REG(&adapter->hw, TARC0, tarc0); 2622 E1000_WRITE_REG(&adapter->hw, TARC0, tarc0);
2627 } 2623 }
2628 2624
2629#ifdef NETIF_F_TSO
2630 /* disable TSO for pcie and 10/100 speeds, to avoid 2625 /* disable TSO for pcie and 10/100 speeds, to avoid
2631 * some hardware issues */ 2626 * some hardware issues */
2632 if (!adapter->tso_force && 2627 if (!adapter->tso_force &&
@@ -2637,22 +2632,17 @@ e1000_watchdog(unsigned long data)
2637 DPRINTK(PROBE,INFO, 2632 DPRINTK(PROBE,INFO,
2638 "10/100 speed: disabling TSO\n"); 2633 "10/100 speed: disabling TSO\n");
2639 netdev->features &= ~NETIF_F_TSO; 2634 netdev->features &= ~NETIF_F_TSO;
2640#ifdef NETIF_F_TSO6
2641 netdev->features &= ~NETIF_F_TSO6; 2635 netdev->features &= ~NETIF_F_TSO6;
2642#endif
2643 break; 2636 break;
2644 case SPEED_1000: 2637 case SPEED_1000:
2645 netdev->features |= NETIF_F_TSO; 2638 netdev->features |= NETIF_F_TSO;
2646#ifdef NETIF_F_TSO6
2647 netdev->features |= NETIF_F_TSO6; 2639 netdev->features |= NETIF_F_TSO6;
2648#endif
2649 break; 2640 break;
2650 default: 2641 default:
2651 /* oops */ 2642 /* oops */
2652 break; 2643 break;
2653 } 2644 }
2654 } 2645 }
2655#endif
2656 2646
2657 /* enable transmits in the hardware, need to do this 2647 /* enable transmits in the hardware, need to do this
2658 * after setting TARC0 */ 2648 * after setting TARC0 */
@@ -2882,7 +2872,6 @@ static int
2882e1000_tso(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring, 2872e1000_tso(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring,
2883 struct sk_buff *skb) 2873 struct sk_buff *skb)
2884{ 2874{
2885#ifdef NETIF_F_TSO
2886 struct e1000_context_desc *context_desc; 2875 struct e1000_context_desc *context_desc;
2887 struct e1000_buffer *buffer_info; 2876 struct e1000_buffer *buffer_info;
2888 unsigned int i; 2877 unsigned int i;
@@ -2911,7 +2900,6 @@ e1000_tso(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring,
2911 0); 2900 0);
2912 cmd_length = E1000_TXD_CMD_IP; 2901 cmd_length = E1000_TXD_CMD_IP;
2913 ipcse = skb->h.raw - skb->data - 1; 2902 ipcse = skb->h.raw - skb->data - 1;
2914#ifdef NETIF_F_TSO6
2915 } else if (skb->protocol == htons(ETH_P_IPV6)) { 2903 } else if (skb->protocol == htons(ETH_P_IPV6)) {
2916 skb->nh.ipv6h->payload_len = 0; 2904 skb->nh.ipv6h->payload_len = 0;
2917 skb->h.th->check = 2905 skb->h.th->check =
@@ -2921,7 +2909,6 @@ e1000_tso(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring,
2921 IPPROTO_TCP, 2909 IPPROTO_TCP,
2922 0); 2910 0);
2923 ipcse = 0; 2911 ipcse = 0;
2924#endif
2925 } 2912 }
2926 ipcss = skb->nh.raw - skb->data; 2913 ipcss = skb->nh.raw - skb->data;
2927 ipcso = (void *)&(skb->nh.iph->check) - (void *)skb->data; 2914 ipcso = (void *)&(skb->nh.iph->check) - (void *)skb->data;
@@ -2954,8 +2941,6 @@ e1000_tso(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring,
2954 2941
2955 return TRUE; 2942 return TRUE;
2956 } 2943 }
2957#endif
2958
2959 return FALSE; 2944 return FALSE;
2960} 2945}
2961 2946
@@ -3013,7 +2998,6 @@ e1000_tx_map(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring,
3013 while (len) { 2998 while (len) {
3014 buffer_info = &tx_ring->buffer_info[i]; 2999 buffer_info = &tx_ring->buffer_info[i];
3015 size = min(len, max_per_txd); 3000 size = min(len, max_per_txd);
3016#ifdef NETIF_F_TSO
3017 /* Workaround for Controller erratum -- 3001 /* Workaround for Controller erratum --
3018 * descriptor for non-tso packet in a linear SKB that follows a 3002 * descriptor for non-tso packet in a linear SKB that follows a
3019 * tso gets written back prematurely before the data is fully 3003 * tso gets written back prematurely before the data is fully
@@ -3028,7 +3012,6 @@ e1000_tx_map(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring,
3028 * in TSO mode. Append 4-byte sentinel desc */ 3012 * in TSO mode. Append 4-byte sentinel desc */
3029 if (unlikely(mss && !nr_frags && size == len && size > 8)) 3013 if (unlikely(mss && !nr_frags && size == len && size > 8))
3030 size -= 4; 3014 size -= 4;
3031#endif
3032 /* work-around for errata 10 and it applies 3015 /* work-around for errata 10 and it applies
3033 * to all controllers in PCI-X mode 3016 * to all controllers in PCI-X mode
3034 * The fix is to make sure that the first descriptor of a 3017 * The fix is to make sure that the first descriptor of a
@@ -3070,12 +3053,10 @@ e1000_tx_map(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring,
3070 while (len) { 3053 while (len) {
3071 buffer_info = &tx_ring->buffer_info[i]; 3054 buffer_info = &tx_ring->buffer_info[i];
3072 size = min(len, max_per_txd); 3055 size = min(len, max_per_txd);
3073#ifdef NETIF_F_TSO
3074 /* Workaround for premature desc write-backs 3056 /* Workaround for premature desc write-backs
3075 * in TSO mode. Append 4-byte sentinel desc */ 3057 * in TSO mode. Append 4-byte sentinel desc */
3076 if (unlikely(mss && f == (nr_frags-1) && size == len && size > 8)) 3058 if (unlikely(mss && f == (nr_frags-1) && size == len && size > 8))
3077 size -= 4; 3059 size -= 4;
3078#endif
3079 /* Workaround for potential 82544 hang in PCI-X. 3060 /* Workaround for potential 82544 hang in PCI-X.
3080 * Avoid terminating buffers within evenly-aligned 3061 * Avoid terminating buffers within evenly-aligned
3081 * dwords. */ 3062 * dwords. */
@@ -3300,7 +3281,6 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
3300 if (adapter->hw.mac_type >= e1000_82571) 3281 if (adapter->hw.mac_type >= e1000_82571)
3301 max_per_txd = 8192; 3282 max_per_txd = 8192;
3302 3283
3303#ifdef NETIF_F_TSO
3304 mss = skb_shinfo(skb)->gso_size; 3284 mss = skb_shinfo(skb)->gso_size;
3305 /* The controller does a simple calculation to 3285 /* The controller does a simple calculation to
3306 * make sure there is enough room in the FIFO before 3286 * make sure there is enough room in the FIFO before
@@ -3354,16 +3334,10 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
3354 if ((mss) || (skb->ip_summed == CHECKSUM_PARTIAL)) 3334 if ((mss) || (skb->ip_summed == CHECKSUM_PARTIAL))
3355 count++; 3335 count++;
3356 count++; 3336 count++;
3357#else
3358 if (skb->ip_summed == CHECKSUM_PARTIAL)
3359 count++;
3360#endif
3361 3337
3362#ifdef NETIF_F_TSO
3363 /* Controller Erratum workaround */ 3338 /* Controller Erratum workaround */
3364 if (!skb->data_len && tx_ring->last_tx_tso && !skb_is_gso(skb)) 3339 if (!skb->data_len && tx_ring->last_tx_tso && !skb_is_gso(skb))
3365 count++; 3340 count++;
3366#endif
3367 3341
3368 count += TXD_USE_COUNT(len, max_txd_pwr); 3342 count += TXD_USE_COUNT(len, max_txd_pwr);
3369 3343