提交 9401bb5c 编写于 作者: G Giuseppe CAVALLARO 提交者: David S. Miller

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: NGiuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 1bb6dea8
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册