diff mbox

gianfar: fix coalescing setup in ethtool support

Message ID 1248857517-8270-1-git-send-email-leoli@freescale.com (mailing list archive)
State Accepted, archived
Delegated to: Kumar Gala
Headers show

Commit Message

Yang Li July 29, 2009, 8:51 a.m. UTC
From: Jiajun Wu <b06378@freescale.com>

Parameter order for using mk_ic_value(count, time) was reversed,
the patch fixes this.

Signed-off-by: Jiajun Wu <b06378@freescale.com>
Signed-off-by: Li Yang <leoli@freescale.com>
---
 drivers/net/gianfar_ethtool.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

Comments

David Miller July 30, 2009, 9:21 p.m. UTC | #1
From: Li Yang <leoli@freescale.com>
Date: Wed, 29 Jul 2009 16:51:57 +0800

> Parameter order for using mk_ic_value(count, time) was reversed,
> the patch fixes this.
> 
> Signed-off-by: Jiajun Wu <b06378@freescale.com>
> Signed-off-by: Li Yang <leoli@freescale.com>

Applied, thanks.
diff mbox

Patch

diff --git a/drivers/net/gianfar_ethtool.c b/drivers/net/gianfar_ethtool.c
index 2a7edfa..3109f4b 100644
--- a/drivers/net/gianfar_ethtool.c
+++ b/drivers/net/gianfar_ethtool.c
@@ -373,9 +373,8 @@  static int gfar_scoalesce(struct net_device *dev, struct ethtool_coalesce *cvals
 		return -EINVAL;
 	}
 
-	priv->rxic = mk_ic_value(
-		gfar_usecs2ticks(priv, cvals->rx_coalesce_usecs),
-		cvals->rx_max_coalesced_frames);
+	priv->rxic = mk_ic_value(cvals->rx_max_coalesced_frames,
+		gfar_usecs2ticks(priv, cvals->rx_coalesce_usecs));
 
 	/* Set up tx coalescing */
 	if ((cvals->tx_coalesce_usecs == 0) ||
@@ -397,9 +396,8 @@  static int gfar_scoalesce(struct net_device *dev, struct ethtool_coalesce *cvals
 		return -EINVAL;
 	}
 
-	priv->txic = mk_ic_value(
-		gfar_usecs2ticks(priv, cvals->tx_coalesce_usecs),
-		cvals->tx_max_coalesced_frames);
+	priv->txic = mk_ic_value(cvals->tx_max_coalesced_frames,
+		gfar_usecs2ticks(priv, cvals->tx_coalesce_usecs));
 
 	gfar_write(&priv->regs->rxic, 0);
 	if (priv->rxcoalescing)