Commit 800c644b authored by Claudiu Manoil's avatar Claudiu Manoil Committed by David S. Miller

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: default avatarClaudiu Manoil <claudiu.manoil@freescale.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5d9657d8
...@@ -341,7 +341,7 @@ static void gfar_init_mac(struct net_device *ndev) ...@@ -341,7 +341,7 @@ static void gfar_init_mac(struct net_device *ndev)
gfar_init_tx_rx_base(priv); gfar_init_tx_rx_base(priv);
/* Configure the coalescing support */ /* Configure the coalescing support */
gfar_configure_coalescing(priv, 0xFF, 0xFF); gfar_configure_coalescing_all(priv);
/* set this when rx hw offload (TOE) functions are being used */ /* set this when rx hw offload (TOE) functions are being used */
priv->uses_rxfcb = 0; priv->uses_rxfcb = 0;
...@@ -1816,7 +1816,7 @@ void gfar_start(struct net_device *dev) ...@@ -1816,7 +1816,7 @@ void gfar_start(struct net_device *dev)
dev->trans_start = jiffies; /* prevent tx timeout */ dev->trans_start = jiffies; /* prevent tx timeout */
} }
void gfar_configure_coalescing(struct gfar_private *priv, static void gfar_configure_coalescing(struct gfar_private *priv,
unsigned long tx_mask, unsigned long rx_mask) unsigned long tx_mask, unsigned long rx_mask)
{ {
struct gfar __iomem *regs = priv->gfargrp[0].regs; struct gfar __iomem *regs = priv->gfargrp[0].regs;
...@@ -1851,6 +1851,11 @@ void gfar_configure_coalescing(struct gfar_private *priv, ...@@ -1851,6 +1851,11 @@ void gfar_configure_coalescing(struct gfar_private *priv,
} }
} }
void gfar_configure_coalescing_all(struct gfar_private *priv)
{
gfar_configure_coalescing(priv, 0xFF, 0xFF);
}
static int register_grp_irqs(struct gfar_priv_grp *grp) static int register_grp_irqs(struct gfar_priv_grp *grp)
{ {
struct gfar_private *priv = grp->priv; struct gfar_private *priv = grp->priv;
...@@ -1940,7 +1945,7 @@ int startup_gfar(struct net_device *ndev) ...@@ -1940,7 +1945,7 @@ int startup_gfar(struct net_device *ndev)
phy_start(priv->phydev); phy_start(priv->phydev);
gfar_configure_coalescing(priv, 0xFF, 0xFF); gfar_configure_coalescing_all(priv);
return 0; return 0;
......
...@@ -1182,8 +1182,7 @@ extern void stop_gfar(struct net_device *dev); ...@@ -1182,8 +1182,7 @@ extern void stop_gfar(struct net_device *dev);
extern void gfar_halt(struct net_device *dev); extern void gfar_halt(struct net_device *dev);
extern void gfar_phy_test(struct mii_bus *bus, struct phy_device *phydev, extern void gfar_phy_test(struct mii_bus *bus, struct phy_device *phydev,
int enable, u32 regnum, u32 read); int enable, u32 regnum, u32 read);
extern void gfar_configure_coalescing(struct gfar_private *priv, extern void gfar_configure_coalescing_all(struct gfar_private *priv);
unsigned long tx_mask, unsigned long rx_mask);
void gfar_init_sysfs(struct net_device *dev); void gfar_init_sysfs(struct net_device *dev);
int gfar_set_features(struct net_device *dev, netdev_features_t features); int gfar_set_features(struct net_device *dev, netdev_features_t features);
extern void gfar_check_rx_parser_mode(struct gfar_private *priv); extern void gfar_check_rx_parser_mode(struct gfar_private *priv);
......
...@@ -436,7 +436,7 @@ static int gfar_scoalesce(struct net_device *dev, ...@@ -436,7 +436,7 @@ static int gfar_scoalesce(struct net_device *dev,
gfar_usecs2ticks(priv, cvals->tx_coalesce_usecs)); gfar_usecs2ticks(priv, cvals->tx_coalesce_usecs));
} }
gfar_configure_coalescing(priv, 0xFF, 0xFF); gfar_configure_coalescing_all(priv);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment