diff options
author | Claudiu Manoil <claudiu.manoil@freescale.com> | 2013-03-19 03:40:05 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-20 13:21:53 -0400 |
commit | 800c644bcd0f2b29020c0dd6b661596c14c0f34f (patch) | |
tree | 480929931c8d691b5b039a5c3acc9d33c2798423 | |
parent | 5d9657d83a1cfecfbe41add0d94863d3fe714df0 (diff) |
gianfar: Refactor config coalescing calls for all queues
The only place where gfar_configure_coalescing is called
with an actual bitmask (other than 0xff) is in gfar_poll
(on the hot path). So make gfar_configure_coalescing()
static for the buffer processing path, and export
gfar_configure_coalescing_all() for the remaining cases
that require to set coalescing for all the queues at once
(on the slow path).
Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/freescale/gianfar.c | 11 | ||||
-rw-r--r-- | drivers/net/ethernet/freescale/gianfar.h | 3 | ||||
-rw-r--r-- | drivers/net/ethernet/freescale/gianfar_ethtool.c | 2 |
3 files changed, 10 insertions, 6 deletions
diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c index e28b3e6b12d9..49ce83b1088f 100644 --- a/drivers/net/ethernet/freescale/gianfar.c +++ b/drivers/net/ethernet/freescale/gianfar.c | |||
@@ -341,7 +341,7 @@ static void gfar_init_mac(struct net_device *ndev) | |||
341 | gfar_init_tx_rx_base(priv); | 341 | gfar_init_tx_rx_base(priv); |
342 | 342 | ||
343 | /* Configure the coalescing support */ | 343 | /* Configure the coalescing support */ |
344 | gfar_configure_coalescing(priv, 0xFF, 0xFF); | 344 | gfar_configure_coalescing_all(priv); |
345 | 345 | ||
346 | /* set this when rx hw offload (TOE) functions are being used */ | 346 | /* set this when rx hw offload (TOE) functions are being used */ |
347 | priv->uses_rxfcb = 0; | 347 | priv->uses_rxfcb = 0; |
@@ -1816,7 +1816,7 @@ void gfar_start(struct net_device *dev) | |||
1816 | dev->trans_start = jiffies; /* prevent tx timeout */ | 1816 | dev->trans_start = jiffies; /* prevent tx timeout */ |
1817 | } | 1817 | } |
1818 | 1818 | ||
1819 | void gfar_configure_coalescing(struct gfar_private *priv, | 1819 | static void gfar_configure_coalescing(struct gfar_private *priv, |
1820 | unsigned long tx_mask, unsigned long rx_mask) | 1820 | unsigned long tx_mask, unsigned long rx_mask) |
1821 | { | 1821 | { |
1822 | struct gfar __iomem *regs = priv->gfargrp[0].regs; | 1822 | struct gfar __iomem *regs = priv->gfargrp[0].regs; |
@@ -1851,6 +1851,11 @@ void gfar_configure_coalescing(struct gfar_private *priv, | |||
1851 | } | 1851 | } |
1852 | } | 1852 | } |
1853 | 1853 | ||
1854 | void gfar_configure_coalescing_all(struct gfar_private *priv) | ||
1855 | { | ||
1856 | gfar_configure_coalescing(priv, 0xFF, 0xFF); | ||
1857 | } | ||
1858 | |||
1854 | static int register_grp_irqs(struct gfar_priv_grp *grp) | 1859 | static int register_grp_irqs(struct gfar_priv_grp *grp) |
1855 | { | 1860 | { |
1856 | struct gfar_private *priv = grp->priv; | 1861 | struct gfar_private *priv = grp->priv; |
@@ -1940,7 +1945,7 @@ int startup_gfar(struct net_device *ndev) | |||
1940 | 1945 | ||
1941 | phy_start(priv->phydev); | 1946 | phy_start(priv->phydev); |
1942 | 1947 | ||
1943 | gfar_configure_coalescing(priv, 0xFF, 0xFF); | 1948 | gfar_configure_coalescing_all(priv); |
1944 | 1949 | ||
1945 | return 0; | 1950 | return 0; |
1946 | 1951 | ||
diff --git a/drivers/net/ethernet/freescale/gianfar.h b/drivers/net/ethernet/freescale/gianfar.h index b1d0c1c77139..eec87eaaae92 100644 --- a/drivers/net/ethernet/freescale/gianfar.h +++ b/drivers/net/ethernet/freescale/gianfar.h | |||
@@ -1182,8 +1182,7 @@ extern void stop_gfar(struct net_device *dev); | |||
1182 | extern void gfar_halt(struct net_device *dev); | 1182 | extern void gfar_halt(struct net_device *dev); |
1183 | extern void gfar_phy_test(struct mii_bus *bus, struct phy_device *phydev, | 1183 | extern void gfar_phy_test(struct mii_bus *bus, struct phy_device *phydev, |
1184 | int enable, u32 regnum, u32 read); | 1184 | int enable, u32 regnum, u32 read); |
1185 | extern void gfar_configure_coalescing(struct gfar_private *priv, | 1185 | extern void gfar_configure_coalescing_all(struct gfar_private *priv); |
1186 | unsigned long tx_mask, unsigned long rx_mask); | ||
1187 | void gfar_init_sysfs(struct net_device *dev); | 1186 | void gfar_init_sysfs(struct net_device *dev); |
1188 | int gfar_set_features(struct net_device *dev, netdev_features_t features); | 1187 | int gfar_set_features(struct net_device *dev, netdev_features_t features); |
1189 | extern void gfar_check_rx_parser_mode(struct gfar_private *priv); | 1188 | extern void gfar_check_rx_parser_mode(struct gfar_private *priv); |
diff --git a/drivers/net/ethernet/freescale/gianfar_ethtool.c b/drivers/net/ethernet/freescale/gianfar_ethtool.c index 75e89acf4912..8248df760aad 100644 --- a/drivers/net/ethernet/freescale/gianfar_ethtool.c +++ b/drivers/net/ethernet/freescale/gianfar_ethtool.c | |||
@@ -436,7 +436,7 @@ static int gfar_scoalesce(struct net_device *dev, | |||
436 | gfar_usecs2ticks(priv, cvals->tx_coalesce_usecs)); | 436 | gfar_usecs2ticks(priv, cvals->tx_coalesce_usecs)); |
437 | } | 437 | } |
438 | 438 | ||
439 | gfar_configure_coalescing(priv, 0xFF, 0xFF); | 439 | gfar_configure_coalescing_all(priv); |
440 | 440 | ||
441 | return 0; | 441 | return 0; |
442 | } | 442 | } |