aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2006-12-12 08:06:23 -0500
committerJeff Garzik <jeff@garzik.org>2007-02-05 16:58:45 -0500
commit1d39ed565cfcc7c4fe586de621aef495c4f94ffb (patch)
treeaf3280a25eb796385c851dc7b83e82f0ff38f1ac /drivers/net/e1000
parent6d24998f07588ca83ce04e60af5a79e805df7532 (diff)
remove NETIF_F_TSO ifdefery
Remove the NETIF_F_TSO #ifdef-ery in drivers/net; this was for old-old-2.4 compat (even current 2.4 has NETIF_F_TSO) but it's time to get rid of it by now. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/e1000')
-rw-r--r--drivers/net/e1000/e1000.h6
-rw-r--r--drivers/net/e1000/e1000_ethtool.c6
-rw-r--r--drivers/net/e1000/e1000_main.c26
3 files changed, 0 insertions, 38 deletions
diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h
index 8e7acb08d9a3..689f158a469e 100644
--- a/drivers/net/e1000/e1000.h
+++ b/drivers/net/e1000/e1000.h
@@ -59,17 +59,13 @@
59#include <linux/capability.h> 59#include <linux/capability.h>
60#include <linux/in.h> 60#include <linux/in.h>
61#include <linux/ip.h> 61#include <linux/ip.h>
62#ifdef NETIF_F_TSO6
63#include <linux/ipv6.h> 62#include <linux/ipv6.h>
64#endif
65#include <linux/tcp.h> 63#include <linux/tcp.h>
66#include <linux/udp.h> 64#include <linux/udp.h>
67#include <net/pkt_sched.h> 65#include <net/pkt_sched.h>
68#include <linux/list.h> 66#include <linux/list.h>
69#include <linux/reboot.h> 67#include <linux/reboot.h>
70#ifdef NETIF_F_TSO
71#include <net/checksum.h> 68#include <net/checksum.h>
72#endif
73#include <linux/mii.h> 69#include <linux/mii.h>
74#include <linux/ethtool.h> 70#include <linux/ethtool.h>
75#include <linux/if_vlan.h> 71#include <linux/if_vlan.h>
@@ -347,9 +343,7 @@ struct e1000_adapter {
347 boolean_t have_msi; 343 boolean_t have_msi;
348#endif 344#endif
349 /* to not mess up cache alignment, always add to the bottom */ 345 /* to not mess up cache alignment, always add to the bottom */
350#ifdef NETIF_F_TSO
351 boolean_t tso_force; 346 boolean_t tso_force;
352#endif
353 boolean_t smart_power_down; /* phy smart power down */ 347 boolean_t smart_power_down; /* phy smart power down */
354 boolean_t quad_port_a; 348 boolean_t quad_port_a;
355 unsigned long flags; 349 unsigned long flags;
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c
index fb96c87f9e56..44ebc72962dc 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -338,7 +338,6 @@ e1000_set_tx_csum(struct net_device *netdev, uint32_t data)
338 return 0; 338 return 0;
339} 339}
340 340
341#ifdef NETIF_F_TSO
342static int 341static int
343e1000_set_tso(struct net_device *netdev, uint32_t data) 342e1000_set_tso(struct net_device *netdev, uint32_t data)
344{ 343{
@@ -352,18 +351,15 @@ e1000_set_tso(struct net_device *netdev, uint32_t data)
352 else 351 else
353 netdev->features &= ~NETIF_F_TSO; 352 netdev->features &= ~NETIF_F_TSO;
354 353
355#ifdef NETIF_F_TSO6
356 if (data) 354 if (data)
357 netdev->features |= NETIF_F_TSO6; 355 netdev->features |= NETIF_F_TSO6;
358 else 356 else
359 netdev->features &= ~NETIF_F_TSO6; 357 netdev->features &= ~NETIF_F_TSO6;
360#endif
361 358
362 DPRINTK(PROBE, INFO, "TSO is %s\n", data ? "Enabled" : "Disabled"); 359 DPRINTK(PROBE, INFO, "TSO is %s\n", data ? "Enabled" : "Disabled");
363 adapter->tso_force = TRUE; 360 adapter->tso_force = TRUE;
364 return 0; 361 return 0;
365} 362}
366#endif /* NETIF_F_TSO */
367 363
368static uint32_t 364static uint32_t
369e1000_get_msglevel(struct net_device *netdev) 365e1000_get_msglevel(struct net_device *netdev)
@@ -1971,10 +1967,8 @@ static const struct ethtool_ops e1000_ethtool_ops = {
1971 .set_tx_csum = e1000_set_tx_csum, 1967 .set_tx_csum = e1000_set_tx_csum,
1972 .get_sg = ethtool_op_get_sg, 1968 .get_sg = ethtool_op_get_sg,
1973 .set_sg = ethtool_op_set_sg, 1969 .set_sg = ethtool_op_set_sg,
1974#ifdef NETIF_F_TSO
1975 .get_tso = ethtool_op_get_tso, 1970 .get_tso = ethtool_op_get_tso,
1976 .set_tso = e1000_set_tso, 1971 .set_tso = e1000_set_tso,
1977#endif
1978 .self_test_count = e1000_diag_test_count, 1972 .self_test_count = e1000_diag_test_count,
1979 .self_test = e1000_diag_test, 1973 .self_test = e1000_diag_test,
1980 .get_strings = e1000_get_strings, 1974 .get_strings = e1000_get_strings,
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