aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/atl1c/atl1c_ethtool.c8
-rw-r--r--drivers/net/atl1c/atl1c_main.c23
-rw-r--r--drivers/net/atl1e/atl1e_ethtool.c3
-rw-r--r--drivers/net/atl1e/atl1e_main.c12
-rw-r--r--drivers/net/atlx/atl1.c15
-rw-r--r--drivers/net/atlx/atl2.c14
6 files changed, 24 insertions, 51 deletions
diff --git a/drivers/net/atl1c/atl1c_ethtool.c b/drivers/net/atl1c/atl1c_ethtool.c
index 7c521508313c..3af5a336a5af 100644
--- a/drivers/net/atl1c/atl1c_ethtool.c
+++ b/drivers/net/atl1c/atl1c_ethtool.c
@@ -113,11 +113,6 @@ static int atl1c_set_settings(struct net_device *netdev,
113 return 0; 113 return 0;
114} 114}
115 115
116static u32 atl1c_get_tx_csum(struct net_device *netdev)
117{
118 return (netdev->features & NETIF_F_HW_CSUM) != 0;
119}
120
121static u32 atl1c_get_msglevel(struct net_device *netdev) 116static u32 atl1c_get_msglevel(struct net_device *netdev)
122{ 117{
123 struct atl1c_adapter *adapter = netdev_priv(netdev); 118 struct atl1c_adapter *adapter = netdev_priv(netdev);
@@ -307,9 +302,6 @@ static const struct ethtool_ops atl1c_ethtool_ops = {
307 .get_link = ethtool_op_get_link, 302 .get_link = ethtool_op_get_link,
308 .get_eeprom_len = atl1c_get_eeprom_len, 303 .get_eeprom_len = atl1c_get_eeprom_len,
309 .get_eeprom = atl1c_get_eeprom, 304 .get_eeprom = atl1c_get_eeprom,
310 .get_tx_csum = atl1c_get_tx_csum,
311 .get_sg = ethtool_op_get_sg,
312 .set_sg = ethtool_op_set_sg,
313}; 305};
314 306
315void atl1c_set_ethtool_ops(struct net_device *netdev) 307void atl1c_set_ethtool_ops(struct net_device *netdev)
diff --git a/drivers/net/atl1c/atl1c_main.c b/drivers/net/atl1c/atl1c_main.c
index 7d9d5067a65c..894d485bf5bc 100644
--- a/drivers/net/atl1c/atl1c_main.c
+++ b/drivers/net/atl1c/atl1c_main.c
@@ -484,6 +484,15 @@ static void atl1c_set_rxbufsize(struct atl1c_adapter *adapter,
484 adapter->rx_buffer_len = mtu > AT_RX_BUF_SIZE ? 484 adapter->rx_buffer_len = mtu > AT_RX_BUF_SIZE ?
485 roundup(mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN, 8) : AT_RX_BUF_SIZE; 485 roundup(mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN, 8) : AT_RX_BUF_SIZE;
486} 486}
487
488static u32 atl1c_fix_features(struct net_device *netdev, u32 features)
489{
490 if (netdev->mtu > MAX_TSO_FRAME_SIZE)
491 features &= ~(NETIF_F_TSO | NETIF_F_TSO6);
492
493 return features;
494}
495
487/* 496/*
488 * atl1c_change_mtu - Change the Maximum Transfer Unit 497 * atl1c_change_mtu - Change the Maximum Transfer Unit
489 * @netdev: network interface device structure 498 * @netdev: network interface device structure
@@ -510,14 +519,8 @@ static int atl1c_change_mtu(struct net_device *netdev, int new_mtu)
510 netdev->mtu = new_mtu; 519 netdev->mtu = new_mtu;
511 adapter->hw.max_frame_size = new_mtu; 520 adapter->hw.max_frame_size = new_mtu;
512 atl1c_set_rxbufsize(adapter, netdev); 521 atl1c_set_rxbufsize(adapter, netdev);
513 if (new_mtu > MAX_TSO_FRAME_SIZE) {
514 adapter->netdev->features &= ~NETIF_F_TSO;
515 adapter->netdev->features &= ~NETIF_F_TSO6;
516 } else {
517 adapter->netdev->features |= NETIF_F_TSO;
518 adapter->netdev->features |= NETIF_F_TSO6;
519 }
520 atl1c_down(adapter); 522 atl1c_down(adapter);
523 netdev_update_features(netdev);
521 atl1c_up(adapter); 524 atl1c_up(adapter);
522 clear_bit(__AT_RESETTING, &adapter->flags); 525 clear_bit(__AT_RESETTING, &adapter->flags);
523 if (adapter->hw.ctrl_flags & ATL1C_FPGA_VERSION) { 526 if (adapter->hw.ctrl_flags & ATL1C_FPGA_VERSION) {
@@ -2585,6 +2588,7 @@ static const struct net_device_ops atl1c_netdev_ops = {
2585 .ndo_set_mac_address = atl1c_set_mac_addr, 2588 .ndo_set_mac_address = atl1c_set_mac_addr,
2586 .ndo_set_multicast_list = atl1c_set_multi, 2589 .ndo_set_multicast_list = atl1c_set_multi,
2587 .ndo_change_mtu = atl1c_change_mtu, 2590 .ndo_change_mtu = atl1c_change_mtu,
2591 .ndo_fix_features = atl1c_fix_features,
2588 .ndo_do_ioctl = atl1c_ioctl, 2592 .ndo_do_ioctl = atl1c_ioctl,
2589 .ndo_tx_timeout = atl1c_tx_timeout, 2593 .ndo_tx_timeout = atl1c_tx_timeout,
2590 .ndo_get_stats = atl1c_get_stats, 2594 .ndo_get_stats = atl1c_get_stats,
@@ -2605,12 +2609,13 @@ static int atl1c_init_netdev(struct net_device *netdev, struct pci_dev *pdev)
2605 atl1c_set_ethtool_ops(netdev); 2609 atl1c_set_ethtool_ops(netdev);
2606 2610
2607 /* TODO: add when ready */ 2611 /* TODO: add when ready */
2608 netdev->features = NETIF_F_SG | 2612 netdev->hw_features = NETIF_F_SG |
2609 NETIF_F_HW_CSUM | 2613 NETIF_F_HW_CSUM |
2610 NETIF_F_HW_VLAN_TX | 2614 NETIF_F_HW_VLAN_TX |
2611 NETIF_F_HW_VLAN_RX |
2612 NETIF_F_TSO | 2615 NETIF_F_TSO |
2613 NETIF_F_TSO6; 2616 NETIF_F_TSO6;
2617 netdev->features = netdev->hw_features |
2618 NETIF_F_HW_VLAN_RX;
2614 return 0; 2619 return 0;
2615} 2620}
2616 2621
diff --git a/drivers/net/atl1e/atl1e_ethtool.c b/drivers/net/atl1e/atl1e_ethtool.c
index 1209297433b8..47783749d9fa 100644
--- a/drivers/net/atl1e/atl1e_ethtool.c
+++ b/drivers/net/atl1e/atl1e_ethtool.c
@@ -382,9 +382,6 @@ static const struct ethtool_ops atl1e_ethtool_ops = {
382 .get_eeprom_len = atl1e_get_eeprom_len, 382 .get_eeprom_len = atl1e_get_eeprom_len,
383 .get_eeprom = atl1e_get_eeprom, 383 .get_eeprom = atl1e_get_eeprom,
384 .set_eeprom = atl1e_set_eeprom, 384 .set_eeprom = atl1e_set_eeprom,
385 .set_tx_csum = ethtool_op_set_tx_hw_csum,
386 .set_sg = ethtool_op_set_sg,
387 .set_tso = ethtool_op_set_tso,
388}; 385};
389 386
390void atl1e_set_ethtool_ops(struct net_device *netdev) 387void atl1e_set_ethtool_ops(struct net_device *netdev)
diff --git a/drivers/net/atl1e/atl1e_main.c b/drivers/net/atl1e/atl1e_main.c
index 1ff001a8270c..c05b2e7c93d0 100644
--- a/drivers/net/atl1e/atl1e_main.c
+++ b/drivers/net/atl1e/atl1e_main.c
@@ -1927,11 +1927,7 @@ void atl1e_down(struct atl1e_adapter *adapter)
1927 * reschedule our watchdog timer */ 1927 * reschedule our watchdog timer */
1928 set_bit(__AT_DOWN, &adapter->flags); 1928 set_bit(__AT_DOWN, &adapter->flags);
1929 1929
1930#ifdef NETIF_F_LLTX
1931 netif_stop_queue(netdev); 1930 netif_stop_queue(netdev);
1932#else
1933 netif_tx_disable(netdev);
1934#endif
1935 1931
1936 /* reset MAC to disable all RX/TX */ 1932 /* reset MAC to disable all RX/TX */
1937 atl1e_reset_hw(&adapter->hw); 1933 atl1e_reset_hw(&adapter->hw);
@@ -2223,10 +2219,10 @@ static int atl1e_init_netdev(struct net_device *netdev, struct pci_dev *pdev)
2223 netdev->watchdog_timeo = AT_TX_WATCHDOG; 2219 netdev->watchdog_timeo = AT_TX_WATCHDOG;
2224 atl1e_set_ethtool_ops(netdev); 2220 atl1e_set_ethtool_ops(netdev);
2225 2221
2226 netdev->features = NETIF_F_SG | NETIF_F_HW_CSUM | 2222 netdev->hw_features = NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_TSO |
2227 NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; 2223 NETIF_F_HW_VLAN_TX;
2228 netdev->features |= NETIF_F_LLTX; 2224 netdev->features = netdev->hw_features |
2229 netdev->features |= NETIF_F_TSO; 2225 NETIF_F_HW_VLAN_RX | NETIF_F_LLTX;
2230 2226
2231 return 0; 2227 return 0;
2232} 2228}
diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c
index e973d056dc8f..98334a1f0c5c 100644
--- a/drivers/net/atlx/atl1.c
+++ b/drivers/net/atlx/atl1.c
@@ -2986,6 +2986,11 @@ static int __devinit atl1_probe(struct pci_dev *pdev,
2986 netdev->features |= NETIF_F_SG; 2986 netdev->features |= NETIF_F_SG;
2987 netdev->features |= (NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX); 2987 netdev->features |= (NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX);
2988 2988
2989 netdev->hw_features = NETIF_F_HW_CSUM | NETIF_F_SG | NETIF_F_TSO;
2990
2991 /* is this valid? see atl1_setup_mac_ctrl() */
2992 netdev->features |= NETIF_F_RXCSUM;
2993
2989 /* 2994 /*
2990 * patch for some L1 of old version, 2995 * patch for some L1 of old version,
2991 * the final version of L1 may not need these 2996 * the final version of L1 may not need these
@@ -3595,12 +3600,6 @@ static int atl1_set_pauseparam(struct net_device *netdev,
3595 return 0; 3600 return 0;
3596} 3601}
3597 3602
3598/* FIXME: is this right? -- CHS */
3599static u32 atl1_get_rx_csum(struct net_device *netdev)
3600{
3601 return 1;
3602}
3603
3604static void atl1_get_strings(struct net_device *netdev, u32 stringset, 3603static void atl1_get_strings(struct net_device *netdev, u32 stringset,
3605 u8 *data) 3604 u8 *data)
3606{ 3605{
@@ -3668,13 +3667,9 @@ static const struct ethtool_ops atl1_ethtool_ops = {
3668 .set_ringparam = atl1_set_ringparam, 3667 .set_ringparam = atl1_set_ringparam,
3669 .get_pauseparam = atl1_get_pauseparam, 3668 .get_pauseparam = atl1_get_pauseparam,
3670 .set_pauseparam = atl1_set_pauseparam,