Skip to content

phy: clear the 10G flag when the port is not a 10G port - #1018

Merged
feelfree69 merged 1 commit into
RTLPlayground:mainfrom
DrDoof:fix/phy-10g-flag
Nov 26, 2026
Merged

feelfree69 merged 1 commit into
RTLPlayground:mainfrom
DrDoof:fix/phy-10g-flag

Conversation

@DrDoof

@DrDoof DrDoof commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator

After the speed of a 10G port was set, every other port is handled as a 10G port. phy_set_speed() sets phy_settings.is10g_port for a port with a 10G PHY and nothing clears it, so the next port <n> auto on a 2.5G port takes the 10G branch and writes 0x0e00 to GBCR instead of 0x0200.

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 auto prints "Setting port 1 to speed auto" before port 5 auto and "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.

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
feelfree69 merged commit 22a431f into RTLPlayground:main Nov 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants