diff options
author | Carolyn Wyborny <carolyn.wyborny@intel.com> | 2011-03-11 23:43:54 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2011-03-12 07:09:55 -0500 |
commit | 831ec0b4226cec7ea34f5c4c9810e78aeb2069bf (patch) | |
tree | 3576b08f16304217c5353b5a6aa2fa5ba5350187 /drivers/net/igb/igb_ethtool.c | |
parent | 4322e561a93ec7ee034b603a6c610e7be90d4e8a (diff) |
igb: Add DMA Coalescing feature to driver
This patch add DMA Coalescing which is a power-saving feature that
coalesces DMA writes in order to stay in a low-power state as much
as possible. Feature is disabled by default.
Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/igb/igb_ethtool.c')
-rw-r--r-- | drivers/net/igb/igb_ethtool.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c index df15a915bbe..d976733bbcc 100644 --- a/drivers/net/igb/igb_ethtool.c +++ b/drivers/net/igb/igb_ethtool.c | |||
@@ -2009,6 +2009,12 @@ static int igb_set_coalesce(struct net_device *netdev, | |||
2009 | if ((adapter->flags & IGB_FLAG_QUEUE_PAIRS) && ec->tx_coalesce_usecs) | 2009 | if ((adapter->flags & IGB_FLAG_QUEUE_PAIRS) && ec->tx_coalesce_usecs) |
2010 | return -EINVAL; | 2010 | return -EINVAL; |
2011 | 2011 | ||
2012 | /* If ITR is disabled, disable DMAC */ | ||
2013 | if (ec->rx_coalesce_usecs == 0) { | ||
2014 | if (adapter->flags & IGB_FLAG_DMAC) | ||
2015 | adapter->flags &= ~IGB_FLAG_DMAC; | ||
2016 | } | ||
2017 | |||
2012 | /* convert to rate of irq's per second */ | 2018 | /* convert to rate of irq's per second */ |
2013 | if (ec->rx_coalesce_usecs && ec->rx_coalesce_usecs <= 3) | 2019 | if (ec->rx_coalesce_usecs && ec->rx_coalesce_usecs <= 3) |
2014 | adapter->rx_itr_setting = ec->rx_coalesce_usecs; | 2020 | adapter->rx_itr_setting = ec->rx_coalesce_usecs; |