aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-06-15 01:59:34 -0400
committerDavid S. Miller <davem@davemloft.net>2010-06-15 01:59:34 -0400
commit6b08f516244abda22c07b5e7db10ef109dc43f2d (patch)
tree098fbb9b45213feeb5e093a9a690ef76e624469a /drivers/net/ixgbe
parent0b5c25e8ac3a60bd01a52ca7405ba96aec8c16be (diff)
parent28c8e4790ca5ef75f54895ca46437f9fbb433ddf (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/ixgbe/ixgbe_ethtool.c With merge conflict help from Stephen Rothwell. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ixgbe')
-rw-r--r--drivers/net/ixgbe/ixgbe_ethtool.c35
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c4
2 files changed, 11 insertions, 28 deletions
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c
index 644e3d21b751..873b45efca40 100644
--- a/drivers/net/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ixgbe/ixgbe_ethtool.c
@@ -2075,25 +2075,6 @@ static int ixgbe_get_coalesce(struct net_device *netdev,
2075 return 0; 2075 return 0;
2076} 2076}
2077 2077
2078/*
2079 * this function must be called before setting the new value of
2080 * rx_itr_setting
2081 */
2082static bool ixgbe_reenable_rsc(struct ixgbe_adapter *adapter,
2083 struct ethtool_coalesce *ec)
2084{
2085 /* check the old value and enable RSC if necessary */
2086 if ((adapter->rx_itr_setting == 0) &&
2087 (adapter->flags2 & IXGBE_FLAG2_RSC_CAPABLE)) {
2088 adapter->flags2 |= IXGBE_FLAG2_RSC_ENABLED;
2089 adapter->netdev->features |= NETIF_F_LRO;
2090 e_info("rx-usecs set to %d, re-enabling RSC\n",
2091 ec->rx_coalesce_usecs);
2092 return true;
2093 }
2094 return false;
2095}
2096
2097static int ixgbe_set_coalesce(struct net_device *netdev, 2078static int ixgbe_set_coalesce(struct net_device *netdev,
2098 struct ethtool_coalesce *ec) 2079 struct ethtool_coalesce *ec)
2099{ 2080{
@@ -2122,9 +2103,6 @@ static int ixgbe_set_coalesce(struct net_device *netdev,
2122 (1000000/ec->rx_coalesce_usecs < IXGBE_MIN_INT_RATE)) 2103 (1000000/ec->rx_coalesce_usecs < IXGBE_MIN_INT_RATE))
2123 return -EINVAL; 2104 return -EINVAL;
2124 2105
2125 /* check the old value and enable RSC if necessary */
2126 need_reset = ixgbe_reenable_rsc(adapter, ec);
2127
2128 /* store the value in ints/second */ 2106 /* store the value in ints/second */
2129 adapter->rx_eitr_param = 1000000/ec->rx_coalesce_usecs; 2107 adapter->rx_eitr_param = 1000000/ec->rx_coalesce_usecs;
2130 2108
@@ -2133,9 +2111,6 @@ static int ixgbe_set_coalesce(struct net_device *netdev,
2133 /* clear the lower bit as its used for dynamic state */ 2111 /* clear the lower bit as its used for dynamic state */
2134 adapter->rx_itr_setting &= ~1; 2112 adapter->rx_itr_setting &= ~1;
2135 } else if (ec->rx_coalesce_usecs == 1) { 2113 } else if (ec->rx_coalesce_usecs == 1) {
2136 /* check the old value and enable RSC if necessary */
2137 need_reset = ixgbe_reenable_rsc(adapter, ec);
2138
2139 /* 1 means dynamic mode */ 2114 /* 1 means dynamic mode */
2140 adapter->rx_eitr_param = 20000; 2115 adapter->rx_eitr_param = 20000;
2141 adapter->rx_itr_setting = 1; 2116 adapter->rx_itr_setting = 1;
@@ -2155,9 +2130,10 @@ static int ixgbe_set_coalesce(struct net_device *netdev,
2155 */ 2130 */
2156 if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) { 2131 if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) {
2157 adapter->flags2 &= ~IXGBE_FLAG2_RSC_ENABLED; 2132 adapter->flags2 &= ~IXGBE_FLAG2_RSC_ENABLED;
2158 netdev->features &= ~NETIF_F_LRO; 2133 if (netdev->features & NETIF_F_LRO) {
2159 e_info("rx-usecs set to 0, disabling RSC\n"); 2134 netdev->features &= ~NETIF_F_LRO;
2160 2135 e_info("rx-usecs set to 0, disabling RSC\n");
2136 }
2161 need_reset = true; 2137 need_reset = true;
2162 } 2138 }
2163 } 2139 }
@@ -2252,6 +2228,9 @@ static int ixgbe_set_flags(struct net_device *netdev, u32 data)
2252 } 2228 }
2253 } else if (!adapter->rx_itr_setting) { 2229 } else if (!adapter->rx_itr_setting) {
2254 netdev->features &= ~ETH_FLAG_LRO; 2230 netdev->features &= ~ETH_FLAG_LRO;
2231 if (data & ETH_FLAG_LRO)
2232 e_info("rx-usecs set to 0, "
2233 "LRO/RSC cannot be enabled.\n");
2255 } 2234 }
2256 } 2235 }
2257 2236
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 6b483d352f23..9cca737e4885 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -5269,6 +5269,10 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter)
5269 u32 i, missed_rx = 0, mpc, bprc, lxon, lxoff, xon_off_tot; 5269 u32 i, missed_rx = 0, mpc, bprc, lxon, lxoff, xon_off_tot;
5270 u64 non_eop_descs = 0, restart_queue = 0; 5270 u64 non_eop_descs = 0, restart_queue = 0;
5271 5271
5272 if (test_bit(__IXGBE_DOWN, &adapter->state) ||
5273 test_bit(__IXGBE_RESETTING, &adapter->state))
5274 return;
5275
5272 if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) { 5276 if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) {
5273 u64 rsc_count = 0; 5277 u64 rsc_count = 0;
5274 u64 rsc_flush = 0; 5278 u64 rsc_flush = 0;