On Mon, 2020-10-19 at 23:45 +0200, Andrew Lunn wrote: > > I have a local patch that just falls back to trying 1000BaseX mode > > if the driver reports SGMII isn't supported and it seems like it > > might be a copper module, but that is a bit of a hack that may need > > to be handled differently. > > Do you also modify what the PHY is advertising to remove the modes > your cannot support?
I think in my case those extra modes only supported in SGMII mode, like 10 and 100Mbps modes, effectively get filtered out because the MAC doesn't support them in the 1000BaseX mode either. But yes, that probably should be fixed up in the PHY capabilities in a "proper" solution. The auto-negotiation is a bit of a weird thing in this case, as there are two negotiations occurring, the 1000BaseX between the PCS/PMA PHY and the module PHY, and the 1000BaseT between the module PHY and the copper link partner. I believe the 88E1111 has some smarts to delay the copper negotiation until it gets the advertisement over 1000BaseX, uses those to figure out its advertisement, and then uses the copper link partner's response to determine the 1000BaseX response. -- Robert Hancock Senior Hardware Designer, Advanced Technologies www.calian.com