Skip to content

TG-641: 10g copper not recover down up#88

Open
paul-sirin wants to merge 3 commits into
tg-v6.18-ath12k-nextfrom
bugfix/TG-641-10g-copper-not-recover-down-up
Open

TG-641: 10g copper not recover down up#88
paul-sirin wants to merge 3 commits into
tg-v6.18-ath12k-nextfrom
bugfix/TG-641-10g-copper-not-recover-down-up

Conversation

@paul-sirin
Copy link
Copy Markdown

@paul-sirin paul-sirin commented May 28, 2026

  1. revert the fix based on using rate match mode, because it causes performance regression
  2. revert MRU jumbo frames, because this is the commit that causes the issue
  3. re-apply MRU jumbo frames properly, see commit message

NO SQUASH MERGE!

@paul-sirin paul-sirin force-pushed the bugfix/TG-641-10g-copper-not-recover-down-up branch 2 times, most recently from 2e5302e to 35653c9 Compare May 28, 2026 16:04
@paul-sirin paul-sirin requested a review from adrian-nicolau May 28, 2026 16:05
paul-sirin and others added 3 commits May 28, 2026 17:13
…kets

This commit applies properly 74f37e8
commit's design flaw was calling mv3310_ptp_update() from
mv3310_read_status() every poll cycle while the link was up. This wrote
to PTP MAC frame-size control registers (0x8c00/0x8e00) to switch
between 1G and XG register groups, which corrupted PHY host SerDes state
for the next link cycle. Moved the XG MRU writes to mv3310_ptp_start(),
which is called from mv3310_resume() after mv3310_power_up()
(post-SWRST, post-100ms delay). Also fixed two latent null-dereferences
in both functions where phydev = priv->phydev was assigned before the
!priv guard check.
@paul-sirin paul-sirin force-pushed the bugfix/TG-641-10g-copper-not-recover-down-up branch from 35653c9 to 2e80c3c Compare May 28, 2026 16:13
@paul-sirin paul-sirin requested review from Copilot and dima1308 May 28, 2026 16:14
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses a 10G copper down/up recovery regression in the Marvell 10G PHY driver by backing out the rate-match workaround and moving jumbo MRU programming to a safer post-reset point.

Changes:

  • Removes the copper_multispeed rate-match handling and reverts default MAC type setup back to 10GBASE-R.
  • Removes runtime PTP MRU updates from link status handling.
  • Programs both XG and 1G/2.5G MRU register groups during PTP start after reset.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
drivers/net/phy/marvell10g.c Reverts rate-match/multispeed handling and removes per-link PTP MRU update calls.
drivers/net/phy/marvell10g_ptp.c Moves jumbo MRU programming into mv3310_ptp_start() and removes speed-cached MRU reconfiguration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 386 to +387
if (ret < 0)
dev_err_ratelimited(&phydev->mdio.dev,
"failed to set MRU for speed=%d (%d)\n",
speed, ret);
else
priv->old_speed = speed;
dev_err(&phydev->mdio.dev, "failed to set MRU: %d\n", ret);
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can just reset ret after PTP before MRU

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