diff options
Diffstat (limited to 'drivers/net/igbvf/netdev.c')
| -rw-r--r-- | drivers/net/igbvf/netdev.c | 18 | 
1 files changed, 5 insertions, 13 deletions
| diff --git a/drivers/net/igbvf/netdev.c b/drivers/net/igbvf/netdev.c index a77afd8a14bb..cc2309027e6a 100644 --- a/drivers/net/igbvf/netdev.c +++ b/drivers/net/igbvf/netdev.c | |||
| @@ -35,6 +35,7 @@ | |||
| 35 | #include <linux/netdevice.h> | 35 | #include <linux/netdevice.h> | 
| 36 | #include <linux/tcp.h> | 36 | #include <linux/tcp.h> | 
| 37 | #include <linux/ipv6.h> | 37 | #include <linux/ipv6.h> | 
| 38 | #include <linux/slab.h> | ||
| 38 | #include <net/checksum.h> | 39 | #include <net/checksum.h> | 
| 39 | #include <net/ip6_checksum.h> | 40 | #include <net/ip6_checksum.h> | 
| 40 | #include <linux/mii.h> | 41 | #include <linux/mii.h> | 
| @@ -1304,8 +1305,6 @@ static void igbvf_configure_tx(struct igbvf_adapter *adapter) | |||
| 1304 | 1305 | ||
| 1305 | /* enable Report Status bit */ | 1306 | /* enable Report Status bit */ | 
| 1306 | adapter->txd_cmd |= E1000_ADVTXD_DCMD_RS; | 1307 | adapter->txd_cmd |= E1000_ADVTXD_DCMD_RS; | 
| 1307 | |||
| 1308 | adapter->tx_queue_len = adapter->netdev->tx_queue_len; | ||
| 1309 | } | 1308 | } | 
| 1310 | 1309 | ||
| 1311 | /** | 1310 | /** | 
| @@ -1399,7 +1398,7 @@ static void igbvf_set_multi(struct net_device *netdev) | |||
| 1399 | { | 1398 | { | 
| 1400 | struct igbvf_adapter *adapter = netdev_priv(netdev); | 1399 | struct igbvf_adapter *adapter = netdev_priv(netdev); | 
| 1401 | struct e1000_hw *hw = &adapter->hw; | 1400 | struct e1000_hw *hw = &adapter->hw; | 
| 1402 | struct dev_mc_list *mc_ptr; | 1401 | struct netdev_hw_addr *ha; | 
| 1403 | u8 *mta_list = NULL; | 1402 | u8 *mta_list = NULL; | 
| 1404 | int i; | 1403 | int i; | 
| 1405 | 1404 | ||
| @@ -1414,8 +1413,8 @@ static void igbvf_set_multi(struct net_device *netdev) | |||
| 1414 | 1413 | ||
| 1415 | /* prepare a packed array of only addresses. */ | 1414 | /* prepare a packed array of only addresses. */ | 
| 1416 | i = 0; | 1415 | i = 0; | 
| 1417 | netdev_for_each_mc_addr(mc_ptr, netdev) | 1416 | netdev_for_each_mc_addr(ha, netdev) | 
| 1418 | memcpy(mta_list + (i++ * ETH_ALEN), mc_ptr->dmi_addr, ETH_ALEN); | 1417 | memcpy(mta_list + (i++ * ETH_ALEN), ha->addr, ETH_ALEN); | 
| 1419 | 1418 | ||
| 1420 | hw->mac.ops.update_mc_addr_list(hw, mta_list, i, 0, 0); | 1419 | hw->mac.ops.update_mc_addr_list(hw, mta_list, i, 0, 0); | 
| 1421 | kfree(mta_list); | 1420 | kfree(mta_list); | 
| @@ -1524,7 +1523,6 @@ void igbvf_down(struct igbvf_adapter *adapter) | |||
| 1524 | 1523 | ||
| 1525 | del_timer_sync(&adapter->watchdog_timer); | 1524 | del_timer_sync(&adapter->watchdog_timer); | 
| 1526 | 1525 | ||
| 1527 | netdev->tx_queue_len = adapter->tx_queue_len; | ||
| 1528 | netif_carrier_off(netdev); | 1526 | netif_carrier_off(netdev); | 
| 1529 | 1527 | ||
| 1530 | /* record the stats before reset*/ | 1528 | /* record the stats before reset*/ | 
| @@ -1857,21 +1855,15 @@ static void igbvf_watchdog_task(struct work_struct *work) | |||
| 1857 | &adapter->link_duplex); | 1855 | &adapter->link_duplex); | 
| 1858 | igbvf_print_link_info(adapter); | 1856 | igbvf_print_link_info(adapter); | 
| 1859 | 1857 | ||
| 1860 | /* | 1858 | /* adjust timeout factor according to speed/duplex */ | 
| 1861 | * tweak tx_queue_len according to speed/duplex | ||
| 1862 | * and adjust the timeout factor | ||
| 1863 | */ | ||
| 1864 | netdev->tx_queue_len = adapter->tx_queue_len; | ||
| 1865 | adapter->tx_timeout_factor = 1; | 1859 | adapter->tx_timeout_factor = 1; | 
| 1866 | switch (adapter->link_speed) { | 1860 | switch (adapter->link_speed) { | 
| 1867 | case SPEED_10: | 1861 | case SPEED_10: | 
| 1868 | txb2b = 0; | 1862 | txb2b = 0; | 
| 1869 | netdev->tx_queue_len = 10; | ||
| 1870 | adapter->tx_timeout_factor = 16; | 1863 | adapter->tx_timeout_factor = 16; | 
| 1871 | break; | 1864 | break; | 
| 1872 | case SPEED_100: | 1865 | case SPEED_100: | 
| 1873 | txb2b = 0; | 1866 | txb2b = 0; | 
| 1874 | netdev->tx_queue_len = 100; | ||
| 1875 | /* maybe add some timeout factor ? */ | 1867 | /* maybe add some timeout factor ? */ | 
| 1876 | break; | 1868 | break; | 
| 1877 | } | 1869 | } | 
