summaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/sja1105/sja1105.h
diff options
context:
space:
mode:
authorVladimir Oltean2019-05-02 22:23:37 +0200
committerDavid S. Miller2019-05-03 16:49:17 +0200
commit1a4c69406cc1c3c42bb7391c8eb544e93fe9b320 (patch)
treeb0854515b6c47fde98d7e089defdac27ee72b3bf /drivers/net/dsa/sja1105/sja1105.h
parentnet: dsa: sja1105: Add support for configuring address ageing time (diff)
downloadkernel-qcow2-linux-1a4c69406cc1c3c42bb7391c8eb544e93fe9b320.tar.gz
kernel-qcow2-linux-1a4c69406cc1c3c42bb7391c8eb544e93fe9b320.tar.xz
kernel-qcow2-linux-1a4c69406cc1c3c42bb7391c8eb544e93fe9b320.zip
net: dsa: sja1105: Prevent PHY jabbering during switch reset
Resetting the switch at runtime is currently done while changing the vlan_filtering setting (due to the required TPID change). But reset is asynchronous with packet egress, and the switch core will not wait for egress to finish before carrying on with the reset operation. As a result, a connected PHY such as the BCM5464 would see an unterminated Ethernet frame and start to jabber (repeat the last seen Ethernet symbols - jabber is by definition an oversized Ethernet frame with bad FCS). This behavior is strange in itself, but it also causes the MACs of some link partners (such as the FRDM-LS1012A) to completely lock up. So as a remedy for this situation, when switch reset is required, simply inhibit Tx on all ports, and wait for the necessary time for the eventual one frame left in the egress queue (not even the Tx inhibit command is instantaneous) to be flushed. Signed-off-by: Vladimir Oltean <olteanv@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/sja1105/sja1105.h')
-rw-r--r--drivers/net/dsa/sja1105/sja1105.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/dsa/sja1105/sja1105.h b/drivers/net/dsa/sja1105/sja1105.h
index 0489d9adf957..b0a155b57e17 100644
--- a/drivers/net/dsa/sja1105/sja1105.h
+++ b/drivers/net/dsa/sja1105/sja1105.h
@@ -22,6 +22,7 @@ struct sja1105_regs {
u64 device_id;
u64 prod_id;
u64 status;
+ u64 port_control;
u64 rgu;
u64 config;
u64 rmii_pll1;