Skip to content

[PHY][gearbox][fec] Configure system/line port FEC, serdes, and link training during port FEC set #3660

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

balanokia
Copy link

@balanokia balanokia commented May 27, 2025

This PR enhances PortsOrch by configuring gearbox system/line-side ports with the correct FEC mode, serdes attributes, and link training enablement when the front-panel port's FEC is changed. This ensures consistent PHY/gearbox behavior and aligns with platform expectations for link stability and signal conditioning.

What I did
Hooked into setPortFec() to:
○ Set serdes attributes (TX FIR pre-emphasis) on system and line-side gearbox ports using a new helper function.
○ Enable link training using setPortLinkTraining() after FEC configuration.
Modified setGearboxPortAttr() to:
○ Properly convert and apply FEC mode and link training enable attributes.
Refactored serdes attribute application into a reusable function:
○ generateSerdesAttrMap() consolidates attribute generation for gearbox ports.
Updated initGearboxPort() to reuse this new serdes generation logic.

Why I did it
• Gearbox PHY configurations (FEC, serdes, link training) need to match line/system-side link partner expectations.
• These settings are essential for link bring-up and signal integrity on gearbox-enabled platforms.
• Avoids the need for separate hardware-specific logic elsewhere by embedding this behavior directly into the port/FEC orchestration path.

How I verified it
• Tested on a platform with gearbox PHY (Broadcom-based) / BCM81356 in Gearbox mode (PAM4 to NRZ).
• Verified:
○ Correct FEC modes are logged and applied to system/line sides.
○ Serdes TX FIR attributes are applied.
○ Link training enablement works and is visible via SDK logs.
• Validated that non-gearbox ports remain unaffected.
Details if related

Copy link

linux-foundation-easycla bot commented May 27, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@balanokia balanokia force-pushed the bala_swss_master_PR branch from 870ea9d to 7e6c901 Compare May 27, 2025 07:21
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@balanokia balanokia changed the title Master branch: IXR7220-D4-36D / BCM81356 PHY FEC fixes for Gearbox po… [PHY][gearbox][fec] Configure system/line port FEC, serdes, and link training during port FEC set May 27, 2025
@balanokia balanokia marked this pull request as ready for review May 29, 2025 03:07
@balanokia balanokia requested a review from prsunny as a code owner May 29, 2025 03:07
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants