]> Pileus Git - ~andy/linux/blobdiff - drivers/net/e1000/e1000_ethtool.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw
[~andy/linux] / drivers / net / e1000 / e1000_ethtool.c
index d6931cabe421e4e4f60b61f77198faea59efe58e..d5ff029aa7b226f6ab60c4d96e46c231f19b9c16 100644 (file)
@@ -1015,8 +1015,6 @@ static void e1000_free_desc_rings(struct e1000_adapter *adapter)
        txdr->buffer_info = NULL;
        kfree(rxdr->buffer_info);
        rxdr->buffer_info = NULL;
-
-       return;
 }
 
 static int e1000_setup_desc_rings(struct e1000_adapter *adapter)
@@ -1711,8 +1709,6 @@ static void e1000_get_wol(struct net_device *netdev,
                wol->wolopts |= WAKE_BCAST;
        if (adapter->wol & E1000_WUFC_MAG)
                wol->wolopts |= WAKE_MAGIC;
-
-       return;
 }
 
 static int e1000_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
@@ -1808,7 +1804,7 @@ static int e1000_get_coalesce(struct net_device *netdev,
        if (adapter->hw.mac_type < e1000_82545)
                return -EOPNOTSUPP;
 
-       if (adapter->itr_setting <= 3)
+       if (adapter->itr_setting <= 4)
                ec->rx_coalesce_usecs = adapter->itr_setting;
        else
                ec->rx_coalesce_usecs = 1000000 / adapter->itr_setting;
@@ -1826,12 +1822,14 @@ static int e1000_set_coalesce(struct net_device *netdev,
                return -EOPNOTSUPP;
 
        if ((ec->rx_coalesce_usecs > E1000_MAX_ITR_USECS) ||
-           ((ec->rx_coalesce_usecs > 3) &&
+           ((ec->rx_coalesce_usecs > 4) &&
             (ec->rx_coalesce_usecs < E1000_MIN_ITR_USECS)) ||
            (ec->rx_coalesce_usecs == 2))
                return -EINVAL;
 
-       if (ec->rx_coalesce_usecs <= 3) {
+       if (ec->rx_coalesce_usecs == 4) {
+               adapter->itr = adapter->itr_setting = 4;
+       } else if (ec->rx_coalesce_usecs <= 3) {
                adapter->itr = 20000;
                adapter->itr_setting = ec->rx_coalesce_usecs;
        } else {