summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/broadcom/bcmsysport.c
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2014-05-16 01:33:53 +0400
committerDavid S. Miller <davem@davemloft.net>2014-05-17 00:41:40 +0400
commit00b91c693e9da851385eed8c9492ac0b0d4e4896 (patch)
tree702e57caf0fe830c9de5366ebf08c862e0a28ef6 /drivers/net/ethernet/broadcom/bcmsysport.c
parentb1ff53e9fd26a11ede97fcad5ff2e9be00b61bf8 (diff)
downloadlinux-00b91c693e9da851385eed8c9492ac0b0d4e4896.tar.xz
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: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bcmsysport.c')
-rw-r--r--drivers/net/ethernet/broadcom/bcmsysport.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bcmsysport.c b/drivers/net/ethernet/broadcom/bcmsysport.c
index 26030d67518b..d40c5b969e9e 100644
--- a/drivers/net/ethernet/broadcom/bcmsysport.c
+++ b/drivers/net/ethernet/broadcom/bcmsysport.c
@@ -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)