Re: [PATCH v14 2/4] phy: Add media type and speed serdes configuration interfaces

From: Steen Hegelund
Date: Thu Feb 18 2021 - 12:32:32 EST


Hi Kishon,

On Tue, 2021-02-16 at 15:54 +0530, Kishon Vijay Abraham I wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
>
> Hi,
>
> On 16/02/21 2:07 pm, Steen Hegelund wrote:
> > Hi Andrew and Kishon,
> >
> > On Mon, 2021-02-15 at 15:07 +0100, Andrew Lunn wrote:
> > > EXTERNAL EMAIL: Do not click links or open attachments unless you
> > > know the content is safe
> > >
> > > On Mon, Feb 15, 2021 at 05:25:10PM +0530, Kishon Vijay Abraham I
> > > wrote:
> > > > Okay. Is it going to be some sort of manual negotiation where
> > > > the
> > > > Ethernet controller invokes set_speed with different speeds? Or
> > > > the
> > > > Ethernet controller will get the speed using some out of band
> > > > mechanism
> > > > and invokes set_speed once with the actual speed?
> > >
> > > Hi Kishon
> > >
> > > There are a few different mechanism possible.
> > >
> > > The SFP has an EEPROM which contains lots of parameters. One is
> > > the
> > > maximum baud rate the module supports. PHYLINK will combine this
> > > information with the MAC capabilities to determine the default
> > > speed.
> > >
> > > The users can select the mode the MAC works in, e.g. 1000BaseX vs
> > > 2500BaseX, via ethtool -s. Different modes needs different
> > > speeds.
> > >
> > > Some copper PHYs will change there host side interface baud rate
> > > when
> > > the media side interface changes mode. 10GBASE-X for 10G copper,
> > > 5GBase-X for 5G COPPER, 2500Base-X for 2.5G copper, and SGMII for
> > > old school 10/100/1G Ethernet.
> > >
> > > Mainline Linux has no support for it, but some 'vendor crap' will
> > > do
> > > a
> > > manual negotiation, simply trying different speeds and see if the
> > > SERDES establishes link. There is nothing standardised for this,
> > > as
> > > far as i know.
> > >
> > >     Andrew
> >
> > Yes, in case I mention the only way to ensure communication is
> > human
> > intervention to set the speed to the highest common denominator.
>
> Okay.. is it the same case for set_media as well?

Yes, but in the media type case, we should be able to get the type from
the DAC cable EPPROM information as mentioned by Andrew, so human
intervention should not be needed.


>
> Thanks
> Kishon

Thanks for your comments.

--
BR
Steen

-=-=-=-=-=-=-=-=-=-=-=-=-=-=
steen.hegelund@xxxxxxxxxxxxx