提交 00b91c69 编写于 作者: F Florian Fainelli 提交者: David S. Miller

net: systemport: wait for packet in umac_enable_set()

When umac_enable_set() is used to disable the UniMAC receiver or
transmitter, we need to make sure that we wait for a full-sized packet
to be processed because the UniMAC hardware stops on a packet boundary,
not immediately.
Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 b1ff53e9
...@@ -1244,6 +1244,12 @@ static inline void umac_enable_set(struct bcm_sysport_priv *priv, ...@@ -1244,6 +1244,12 @@ static inline void umac_enable_set(struct bcm_sysport_priv *priv,
else else
reg &= ~(CMD_RX_EN | CMD_TX_EN); reg &= ~(CMD_RX_EN | CMD_TX_EN);
umac_writel(priv, reg, UMAC_CMD); umac_writel(priv, reg, UMAC_CMD);
/* UniMAC stops on a packet boundary, wait for a full-sized packet
* to be processed (1 msec).
*/
if (enable == 0)
usleep_range(1000, 2000);
} }
static inline int umac_reset(struct bcm_sysport_priv *priv) static inline int umac_reset(struct bcm_sysport_priv *priv)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册