sonic-swss
sonic-swss copied to clipboard
Restore preemphasis when AN is transitioned from ON to OFF
What I did Restore preemphasis when AN is transitioned from ON to OFF
Why I did it In certain switches, link training is enabled along with auto-negotiation(AN) enabled. In this case, the preemphasis settings may be changed due to the presence of enabled link training. Therefore, it's essential to restore the preemphasis value when auto-negotiation transitions from ON to OFF.
How I verified it
- Check the current pre-emphasis value P1 by bcmcmd.
- Enable AN on a port, make sure the port is up and the pre-emphasis is changed to P2 by link-training.
- Disable AN on the testing port, check the pre-emphasis value is restored to P1 by bcmcmd.
Details if related
Hi, @prsunny ,
Please review this PR, thank you.