[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yf0C4WYxbzFcMO/N@shell.armlinux.org.uk>
Date: Fri, 4 Feb 2022 10:41:37 +0000
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Serge Semin <Sergey.Semin@...kalelectronics.ru>
Cc: Пархоменко Павел Кириллович <Pavel.Parkhomenko@...kalelectronics.ru>,
"michael@...pelberg.de" <michael@...pelberg.de>,
"afleming@...il.com" <afleming@...il.com>,
"f.fainelli@...il.com" <f.fainelli@...il.com>,
"andrew@...n.ch" <andrew@...n.ch>,
Малахов Алексей Валерьевич <Alexey.Malahov@...kalelectronics.ru>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Heiner Kallweit <hkallweit1@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Serge Semin <fancer.lancer@...il.com>
Subject: Re: [PATCH] net: phy: marvell: Fix RGMII Tx/Rx delays setting in
88e1121-compatible PHYs
On Fri, Feb 04, 2022 at 12:56:21PM +0300, Serge Semin wrote:
> +Cc: Heiner, Russel, David, Jakub
>
> -Sergey
>
> On Fri, Feb 04, 2022 at 08:29:11AM +0300, Пархоменко Павел Кириллович wrote:
> > It is mandatory for a software to issue a reset upon modifying RGMII
> > Receive Timing Control and RGMII Transmit Timing Control bit fields of MAC
> > Specific Control register 2 (page 2, register 21) otherwise the changes
> > won't be perceived by the PHY (the same is applicable for a lot of other
> > registers). Not setting the RGMII delays on the platforms that imply
> > it's being done on the PHY side will consequently cause the traffic loss.
> > We discovered that the denoted soft-reset is missing in the
> > m88e1121_config_aneg() method for the case if the RGMII delays are
> > modified but the MDIx polarity isn't changed or the auto-negotiation is
> > left enabled, thus causing the traffic loss on our platform with Marvell
> > Alaska 88E1510 installed. Let's fix that by issuing the soft-reset if the
> > delays have been actually set in the m88e1121_config_aneg_rgmii_delays()
> > method.
Thanks. Indeed, this appears to be correct for the 88E151x PHYs.
Reviewed-by: Russell King (Oracle) <rmk+kernel@...linux.org.uk>
> > Fixes: d6ab93364734 ("net: phy: marvell: Avoid unnecessary soft reset")
> > Signed-off-by: Pavel Parkhomenko <Pavel.Parkhomenko@...kalelectronics.ru>
> > Reviewed-by: Serge Semin <Sergey.Semin@...kalelectronics.ru>
> > Cc: Alexey Malahov <Alexey.Malahov@...kalelectronics.ru>
> > Cc: Serge Semin <Sergey.Semin@...kalelectronics.ru>
> > Cc: netdev@...r.kernel.org
> > Cc: linux-kernel@...r.kernel.org
> >
> > ---
> > drivers/net/phy/marvell.c | 10 ++++++----
> > 1 file changed, 6 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
> > index 4fcfca4e1702..a4f685927a64 100644
> > --- a/drivers/net/phy/marvell.c
> > +++ b/drivers/net/phy/marvell.c
> > @@ -551,9 +551,9 @@ static int m88e1121_config_aneg_rgmii_delays(struct
> > phy_device *phydev)
> > else
> > mscr = 0;
> >
> > - return phy_modify_paged(phydev, MII_MARVELL_MSCR_PAGE,
> > - MII_88E1121_PHY_MSCR_REG,
> > - MII_88E1121_PHY_MSCR_DELAY_MASK, mscr);
> > + return phy_modify_paged_changed(phydev, MII_MARVELL_MSCR_PAGE,
> > + MII_88E1121_PHY_MSCR_REG,
> > + MII_88E1121_PHY_MSCR_DELAY_MASK, mscr);
> > }
> >
> > static int m88e1121_config_aneg(struct phy_device *phydev)
> > @@ -567,11 +567,13 @@ static int m88e1121_config_aneg(struct phy_device *phydev)
> > return err;
> > }
> >
> > + changed = err;
> > +
> > err = marvell_set_polarity(phydev, phydev->mdix_ctrl);
> > if (err < 0)
> > return err;
> >
> > - changed = err;
> > + changed |= err;
> >
> > err = genphy_config_aneg(phydev);
> > if (err < 0)
> > --
> > 2.34.1
> >
> >
>
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists