[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aRj4L-BKoFeaJpWH@shell.armlinux.org.uk>
Date: Sat, 15 Nov 2025 22:01:19 +0000
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Fabio Estevam <festevam@...il.com>
Cc: Heiner Kallweit <hkallweit1@...il.com>, edumazet <edumazet@...gle.com>,
netdev <netdev@...r.kernel.org>, Andrew Lunn <andrew@...n.ch>
Subject: Re: LAN8720: RX errors / packet loss when using smsc PHY driver on
i.MX6Q
On Sat, Nov 15, 2025 at 06:54:08PM -0300, Fabio Estevam wrote:
> On Sat, Nov 15, 2025 at 6:26 PM Heiner Kallweit <hkallweit1@...il.com> wrote:
>
> > smsc_phy_reset() does two things:
> > 1. set PHY to "all capable" mode if in power-down
> > 2. genphy_soft_reset()
> >
> > Again, as the genphy driver works fine for you, both parts should be optional.
> > Check with part is causing the packet loss.
>
> It is the genphy_soft_reset() that causes the packet loss.
>
> If I comment it out like this, there is no packet loss:
>
> --- a/drivers/net/phy/smsc.c
> +++ b/drivers/net/phy/smsc.c
> @@ -149,8 +149,7 @@ static int smsc_phy_reset(struct phy_device *phydev)
> phy_write(phydev, MII_LAN83C185_SPECIAL_MODES, rc);
> }
>
> - /* reset the phy */
> - return genphy_soft_reset(phydev);
> + return 0
> }
>
This is no proof. The two are not independent. See 3.7.2 of the LAN8720
datasheet. A change to the MODE[2:0] field requires a soft reset to
take effect.
Avoiding the soft reset just means effectively you've disabled the
effect of the write to MII_LAN83C185_SPECIAL_MODES. I don't see
anywhere else that the driver would set the RESET bit in BMCR, so
this write will never take effect.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists