Patchwork [2/2] sfc: Report correct tx-usecs-irq value when driver is loaded with separate_tx_channels set

login
register
mail settings
Submitter Ripduman Sohan
Date Aug. 31, 2011, 9:53 a.m.
Message ID <1314784380-30656-1-git-send-email-ripduman.sohan@cl.cam.ac.uk>
Download mbox | patch
Permalink /patch/112494/
State Awaiting Upstream
Delegated to: David Miller
Headers show

Comments

Ripduman Sohan - Aug. 31, 2011, 9:53 a.m.
If the driver is loaded with the separate_tx_channels parameter set it
incorrectly reports TX moderation as 0 usecs regardless of the current
value.  This patch fixes this oversight.
---
 drivers/net/sfc/ethtool.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

Patch

diff --git a/drivers/net/sfc/ethtool.c b/drivers/net/sfc/ethtool.c
index 0a52447..dac0a84 100644
--- a/drivers/net/sfc/ethtool.c
+++ b/drivers/net/sfc/ethtool.c
@@ -600,11 +600,8 @@  static int efx_ethtool_get_coalesce(struct net_device *net_dev,
 		if (!efx_channel_has_tx_queues(channel))
 			continue;
 		if (channel->irq_moderation < coalesce->tx_coalesce_usecs_irq) {
-			if (channel->channel < efx->n_rx_channels)
-				coalesce->tx_coalesce_usecs_irq =
-					channel->irq_moderation;
-			else
-				coalesce->tx_coalesce_usecs_irq = 0;
+			coalesce->tx_coalesce_usecs_irq =
+				channel->irq_moderation;
 		}
 	}