RE: [PATCH RFC net-next 1/2] net: pcs: xpcs: Add special code to operate in Microchip KSZ9477 switch
From: Tristram.Ha
Date: Tue Jan 28 2025 - 19:31:37 EST
> On Mon, Jan 27, 2025 at 07:32:25PM -0800, Tristram.Ha@xxxxxxxxxxxxx wrote:
> > However SGMII mode in KSZ9477 has a bug in which the current speed
> > needs to be set in MII_BMCR to pass traffic. The current driver code
> > does not do anything when link is up with auto-negotiation enabled, so
> > that code needs to be changed for KSZ9477.
>
> Does this claimed SGMII bug have an erratum number like Microchip usually
> assign for something this serious? Is it something we can look up?
KSZ9477 errata module 7 indicates the MII_ADVERTISE register needs to be
set 0x01A0. This is done with phylink_mii_c22_pcs_encode_advertisement()
but only for 1000BaseX mode. I probably need to add that code in SGMII
configuration. The default value of this register is 0x20. This update
depends on SFP. So far I did not find a SGMII SFP that requires this
setting. This issue is more like the hardware did not set the default
value properly.
KSZ9477 errata module 8 indicates the MII_BMCR register needs to be
updated with the correct speed setting.