summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe CAVALLARO <peppe.cavallaro@st.com>2013-04-08 02:10:03 +0000
committerDavid S. Miller <davem@davemloft.net>2013-04-08 16:55:27 -0400
commit9401bb5c339d2f9529b2f859638440ce92227c83 (patch)
treeb870797f96984bcd84ab0f5498cb49aa2d181b27
parent1bb6dea8cc208e6bac824fcdaa3dc63d38901ca7 (diff)
stmmac: prefetch all dma_erx when use extend_desc
This patch is to prefetch, in the stmmac_rx, the whole dma_erx descriptor in case of using the extended descriptors. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_main.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 8ba05327851a..71b64857e3a6 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2006,7 +2006,7 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit)
#endif
while (count < limit) {
int status;
- struct dma_desc *p, *p_next;
+ struct dma_desc *p;
if (priv->extend_desc)
p = (struct dma_desc *)(priv->dma_erx + entry);
@@ -2020,12 +2020,9 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit)
next_entry = (++priv->cur_rx) % rxsize;
if (priv->extend_desc)
- p_next = (struct dma_desc *)(priv->dma_erx +
- next_entry);
+ prefetch(priv->dma_erx + next_entry);
else
- p_next = priv->dma_rx + next_entry;
-
- prefetch(p_next);
+ prefetch(priv->dma_rx + next_entry);
/* read the status of the incoming frame */
status = priv->hw->desc->rx_status(&priv->dev->stats,