Re: [PATCH net-next 1/2] net: phylink: explicitly configure in-band autoneg for PHYs that support it

2021-02-14 Thread Russell King - ARM Linux admin
On Sun, Feb 14, 2021 at 01:10:14PM +0200, Vladimir Oltean wrote: > On Sun, Feb 14, 2021 at 10:35:29AM +, Russell King - ARM Linux admin > wrote: > > As mentioned in this thread, we have at least one PHY which is unable > > to provide the inband signalling in any mode (BCM84881). Currently, > >

Re: [PATCH net-next 1/2] net: phylink: explicitly configure in-band autoneg for PHYs that support it

2021-02-14 Thread Vladimir Oltean
On Sun, Feb 14, 2021 at 10:35:29AM +, Russell King - ARM Linux admin wrote: > > + if (ret && ret != -EOPNOTSUPP) { > > + phylink_warn(pl, "failed to configure PHY in-band autoneg: > > %d\n", > > +ret); > > Please use %pe and ERR_PTR(ret) so we can get a sym

Re: [PATCH net-next 1/2] net: phylink: explicitly configure in-band autoneg for PHYs that support it

2021-02-14 Thread Russell King - ARM Linux admin
On Fri, Feb 12, 2021 at 07:23:40PM +0200, Vladimir Oltean wrote: > + ret = phy_config_inband_aneg(phy, > + (pl->cur_link_an_mode == MLO_AN_INBAND)); Please use phylink_autoneg_inband(pl->cur_link_an_mode) here. > + if (ret && ret != -EOPNOTSUPP) { > +

Re: [PATCH net-next 1/2] net: phylink: explicitly configure in-band autoneg for PHYs that support it

2021-02-13 Thread Russell King - ARM Linux admin
On Sat, Feb 13, 2021 at 08:57:46PM +0100, Michael Walle wrote: > But then why bother with config_inband_aneg() at all and just enable > it unconditionally in config_init(). [and maybe keep the return -EINVAL]. > Which then begs the question, does it makes sense on (Q)SGMII links at > all? There ar

Re: [PATCH net-next 1/2] net: phylink: explicitly configure in-band autoneg for PHYs that support it

2021-02-13 Thread Vladimir Oltean
On Sat, Feb 13, 2021 at 08:57:46PM +0100, Michael Walle wrote: > > On the other hand, I never meant for the inband autoneg setting to only > > be configurable both ways. > > Then why is there a "bool enabled"? Let me stress the word _only_ both ways. The whole point of the "bool enabled" is to att

Re: [PATCH net-next 1/2] net: phylink: explicitly configure in-band autoneg for PHYs that support it

2021-02-13 Thread Michael Walle
Am 2021-02-13 19:56, schrieb Vladimir Oltean: On Sat, Feb 13, 2021 at 06:09:13PM +0100, Michael Walle wrote: Am 2021-02-13 17:53, schrieb Michael Walle: > Am 2021-02-13 01:36, schrieb Vladimir Oltean: > But the Atheros PHY seems to have a problem with the SGMII link > if there is no autoneg. > N

Re: [PATCH net-next 1/2] net: phylink: explicitly configure in-band autoneg for PHYs that support it

2021-02-13 Thread Vladimir Oltean
On Sat, Feb 13, 2021 at 06:09:13PM +0100, Michael Walle wrote: > Am 2021-02-13 17:53, schrieb Michael Walle: > > Am 2021-02-13 01:36, schrieb Vladimir Oltean: > > But the Atheros PHY seems to have a problem with the SGMII link > > if there is no autoneg. > > No matter what I do, I can't get any tra

Re: [PATCH net-next 1/2] net: phylink: explicitly configure in-band autoneg for PHYs that support it

2021-02-13 Thread Michael Walle
Am 2021-02-13 17:53, schrieb Michael Walle: Am 2021-02-13 01:36, schrieb Vladimir Oltean: But the Atheros PHY seems to have a problem with the SGMII link if there is no autoneg. No matter what I do, I can't get any traffic though if its not gigabit on the copper side. Unfortunately, I don't have

Re: [PATCH net-next 1/2] net: phylink: explicitly configure in-band autoneg for PHYs that support it

2021-02-13 Thread Russell King - ARM Linux admin
On Sat, Feb 13, 2021 at 05:41:55PM +0100, Michael Walle wrote: > Am 2021-02-13 01:18, schrieb Russell King - ARM Linux admin: > > That is a function of the interface mode and the PHY capabilities. > > > > 1) if the PHY supports rate adaption, and is programmed for that, then > >the PHY link no

Re: [PATCH net-next 1/2] net: phylink: explicitly configure in-band autoneg for PHYs that support it

2021-02-13 Thread Andrew Lunn
> Thanks, but I'm not sure I understand the difference between "rate > adaption" and symbol repetition. The SGMII link is always 1.25Gb, > right? If the media side is 100Mbit it will repeat the symbol 10 > times or 100 times in case of 10Mbit. What is "rate adaption" then? Hi Michael Some multiG

Re: [PATCH net-next 1/2] net: phylink: explicitly configure in-band autoneg for PHYs that support it

2021-02-13 Thread Michael Walle
Am 2021-02-13 01:36, schrieb Vladimir Oltean: On Fri, Feb 12, 2021 at 11:40:59PM +0100, Michael Walle wrote: Am 2021-02-12 18:23, schrieb Vladimir Oltean: > From: Vladimir Oltean > > Currently Linux has no control over whether a MAC-to-PHY interface uses > in-band signaling or not, even though

Re: [PATCH net-next 1/2] net: phylink: explicitly configure in-band autoneg for PHYs that support it

2021-02-13 Thread Michael Walle
Am 2021-02-13 01:18, schrieb Russell King - ARM Linux admin: On Fri, Feb 12, 2021 at 11:40:59PM +0100, Michael Walle wrote: Fun fact, now it may be the other way around. If the bootloader doesn't configure it and the PHY isn't reset by the hardware, it won't work in the bootloader after a reboo

Re: [PATCH net-next 1/2] net: phylink: explicitly configure in-band autoneg for PHYs that support it

2021-02-12 Thread Vladimir Oltean
On Fri, Feb 12, 2021 at 11:40:59PM +0100, Michael Walle wrote: > Am 2021-02-12 18:23, schrieb Vladimir Oltean: > > From: Vladimir Oltean > > > > Currently Linux has no control over whether a MAC-to-PHY interface uses > > in-band signaling or not, even though phylink has the > > managed = "in-

Re: [PATCH net-next 1/2] net: phylink: explicitly configure in-band autoneg for PHYs that support it

2021-02-12 Thread Russell King - ARM Linux admin
On Fri, Feb 12, 2021 at 11:40:59PM +0100, Michael Walle wrote: > Fun fact, now it may be the other way around. If the bootloader doesn't > configure it and the PHY isn't reset by the hardware, it won't work in > the bootloader after a reboot ;) If we start messing around with the configuration of

Re: [PATCH net-next 1/2] net: phylink: explicitly configure in-band autoneg for PHYs that support it

2021-02-12 Thread Michael Walle
Am 2021-02-12 18:23, schrieb Vladimir Oltean: From: Vladimir Oltean Currently Linux has no control over whether a MAC-to-PHY interface uses in-band signaling or not, even though phylink has the managed = "in-band-status"; property which denotes that the MAC expects in-band signaling to

[PATCH net-next 1/2] net: phylink: explicitly configure in-band autoneg for PHYs that support it

2021-02-12 Thread Vladimir Oltean
From: Vladimir Oltean Currently Linux has no control over whether a MAC-to-PHY interface uses in-band signaling or not, even though phylink has the managed = "in-band-status"; property which denotes that the MAC expects in-band signaling to be used. The problem is really that if the in-b