Commit f22f9583 authored by Committed by Ezequiel GarciaBrowse files
dsa: mv88e6xxx: Zodiac Spanning Tree Safety Net.
Provides a mechanism to protect the CPU from broadcast storm when spanning tree does the wrong thing/is too slow. /sys/kernel/debugfs/zii_hacks contains a directory per switch chip. Within each directory are two files per user port: /sys/kernel/debug/zii_hacks/0.1:00# ls link_shutdown_1 link_shutdown_2 link_shutdown_3 link_shutdown_4 shutdown_link_on_member_violation_1 shutdown_link_on_member_violation_2 shutdown_link_on_member_violation_3 shutdown_link_on_member_violation_4 echo'ing y into shutdown_link_on_member_violation_? enables the feature for that port. echo'ing n disables it. If an ATU member violation interrupt occurs for a port which is enabled, the port is disabled. For a port using a copper PHY, the PHY transmitter is disabled. This can only be restored with a cold boot, or maybe a hardware reset of the switch. Software reset is not sufficient. If the port is using an SERDES, e.g for an SFF/SFP, the SERDES is powered off. ifdown/ifup is probably sufficient to clear this. link_shutdown-? will indicate if a port has sometime in the past been disabled because of an ATU member violation. For a SERDES port, an ifdown/up will restore the operation of the port, and the contents of the file will reflect this.