Repository navigation
phy: clear the 10G flag when the port is not a 10G port - #1018
Merged
Merged
Conversation
phy_set_speed() sets is10g_port for a port with a 10G PHY and never clears it. After the speed of such a port was set, every other port is treated as a 10G port too.
feelfree69
approved these changes
Nov 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After the speed of a 10G port was set, every other port is handled as a 10G port.
phy_set_speed()setsphy_settings.is10g_portfor a port with a 10G PHY and nothing clears it, so the nextport <n> autoon a 2.5G port takes the 10G branch and writes0x0e00to GBCR instead of0x0200.The flag is cleared at the start of the function now.
In rtlsim with the image for HORACO_ZX310S_4T2XT, which has two 10G ports: on main
port 1 autoprints "Setting port 1 to speed auto" beforeport 5 autoand "Setting port 1 to speed auto (10g)" after it, and so do ports 2, 3 and 4. With this change only ports 5 and 6 print "(10g)". Not tried on real hardware.