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>
This commit is contained in:

committed by
David S. Miller

parent
8456721dd4
commit
1a4c69406c
@@ -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;
|
||||
|
Reference in New Issue
Block a user