Skip to content

Commit

Permalink
net: systemport: wait for packet in umac_enable_set()
Browse files Browse the repository at this point in the history
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: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Florian Fainelli authored and David S. Miller committed May 16, 2014
1 parent b1ff53e commit 00b91c6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/net/ethernet/broadcom/bcmsysport.c
Original file line number Diff line number Diff line change
Expand Up @@ -1244,6 +1244,12 @@ static inline void umac_enable_set(struct bcm_sysport_priv *priv,
else
reg &= ~(CMD_RX_EN | CMD_TX_EN);
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)
Expand Down

0 comments on commit 00b91c6

Please sign in to comment.