lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOMZO5BgfiM13hc=jYiouFSe5D_d71kFrr=66-CjLE-xuffHPw@mail.gmail.com>
Date: Sat, 15 Nov 2025 23:14:33 -0300
From: Fabio Estevam <festevam@...il.com>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
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 9:57 PM Fabio Estevam <festevam@...il.com> wrote:

> I have also tried describing it inside the ethernet-phy node with:
> reset-assert-us; reset-deassert-us; and reset-gpios, but it did not help.

Ok, what do you think about the change below?

It will work when reset-gpios is described inside the ethernet-phy node.

It will not work when the reset GPIO is specified within the FEC node
via the phy-reset-gpios property.

This is OK as 'phy-reset-gpios' is marked as deprecated in
Documentation/devicetree/bindings/net/fsl, fec.yaml.

--- a/drivers/net/phy/smsc.c
+++ b/drivers/net/phy/smsc.c
@@ -147,9 +147,19 @@ static int smsc_phy_reset(struct phy_device *phydev)
                /* set "all capable" mode */
                rc |= MII_LAN83C185_MODE_ALL;
                phy_write(phydev, MII_LAN83C185_SPECIAL_MODES, rc);
+               /* reset the phy */
+               return genphy_soft_reset(phydev);
        }

-       /* reset the phy */
+       /*
+        * If the reset-gpios property exists, a hardware reset will be
+        * performed by the PHY core, so do NOT issue a soft reset here.
+        */
+       if (phydev->mdio.dev.of_node &&
+           of_property_present(phydev->mdio.dev.of_node, "reset-gpios"))
+               return 0;
+
+       /* No reset GPIO: fall back to soft reset */
        return genphy_soft_reset(phydev);
 }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ