aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_ethtool.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-08-13 22:59:44 -0400
committerDavid S. Miller <davem@davemloft.net>2009-08-13 22:59:44 -0400
commit5c16807d3d196203d2d3c9fae51ac7e422091904 (patch)
tree850c33533f80fe426b477c4660c61ba22315a808 /drivers/net/ixgbe/ixgbe_ethtool.c
parente5e2a8fd8358d1b3a2c51c3248edee72e4194703 (diff)
parent232e7d68d50c9ac3a55d716e5ae215ecd1e043b9 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/netxen/netxen_nic_main.c
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_ethtool.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_ethtool.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c
index c6db9a04187d..dd221bba54d9 100644
--- a/drivers/net/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ixgbe/ixgbe_ethtool.c
@@ -1953,6 +1953,7 @@ static int ixgbe_set_coalesce(struct net_device *netdev,
1953 struct ethtool_coalesce *ec) 1953 struct ethtool_coalesce *ec)
1954{ 1954{
1955 struct ixgbe_adapter *adapter = netdev_priv(netdev); 1955 struct ixgbe_adapter *adapter = netdev_priv(netdev);
1956 struct ixgbe_q_vector *q_vector;
1956 int i; 1957 int i;
1957 1958
1958 if (ec->tx_max_coalesced_frames_irq) 1959 if (ec->tx_max_coalesced_frames_irq)
@@ -1987,14 +1988,24 @@ static int ixgbe_set_coalesce(struct net_device *netdev,
1987 adapter->itr_setting = 0; 1988 adapter->itr_setting = 0;
1988 } 1989 }
1989 1990
1990 for (i = 0; i < adapter->num_msix_vectors - NON_Q_VECTORS; i++) { 1991 /* MSI/MSIx Interrupt Mode */
1991 struct ixgbe_q_vector *q_vector = adapter->q_vector[i]; 1992 if (adapter->flags &
1992 if (q_vector->txr_count && !q_vector->rxr_count) 1993 (IXGBE_FLAG_MSIX_ENABLED | IXGBE_FLAG_MSI_ENABLED)) {
1993 /* tx vector gets half the rate */ 1994 int num_vectors = adapter->num_msix_vectors - NON_Q_VECTORS;
1994 q_vector->eitr = (adapter->eitr_param >> 1); 1995 for (i = 0; i < num_vectors; i++) {
1995 else 1996 q_vector = adapter->q_vector[i];
1996 /* rx only or mixed */ 1997 if (q_vector->txr_count && !q_vector->rxr_count)
1997 q_vector->eitr = adapter->eitr_param; 1998 /* tx vector gets half the rate */
1999 q_vector->eitr = (adapter->eitr_param >> 1);
2000 else
2001 /* rx only or mixed */
2002 q_vector->eitr = adapter->eitr_param;
2003 ixgbe_write_eitr(q_vector);
2004 }
2005 /* Legacy Interrupt Mode */
2006 } else {
2007 q_vector = adapter->q_vector[0];
2008 q_vector->eitr = adapter->eitr_param;
1998 ixgbe_write_eitr(q_vector); 2009 ixgbe_write_eitr(q_vector);
1999 } 2010 }
2000 2011