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: <1ec7a98b-ed61-4faf-8a0f-ec0443c9195e@gmail.com>
Date: Fri, 14 Nov 2025 22:33:31 +0100
From: Heiner Kallweit <hkallweit1@...il.com>
To: Fabio Estevam <festevam@...il.com>
Cc: Russell King - ARM Linux <linux@...linux.org.uk>,
 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 11/14/2025 10:15 PM, Fabio Estevam wrote:
> Hi Andrew,
> 
> On Thu, Nov 13, 2025 at 7:35 PM Andrew Lunn <andrew@...n.ch> wrote:
> 
>> Maybe dump all 32 registers when genphy and smsc driver are being used
>> and compare them?
> 
> The dump of all the 32 registers are identical in both cases:
> 
> ./mii-diag -vvv
> mii-diag.c:v2.11 3/21/2005 Donald Becker (becker@...ld.com)
>  http://www.scyld.com/diag/index.html
> Using the default interface 'eth0'.
>   Using the new SIOCGMIIPHY value on PHY 0 (BMCR 0x3100).
>  The autonegotiated capability is 01e0.
> The autonegotiated media type is 100baseTx-FD.
>  Basic mode control register 0x3100: Auto-negotiation enabled.
>  You have link beat, and everything is working OK.
>    This transceiver is capable of  100baseTx-FD 100baseTx 10baseT-FD 10baseT.
>    Able to perform Auto-negotiation, negotiation complete.
>  Your link partner advertised cde1: Flow-control 100baseTx-FD
> 100baseTx 10baseT-FD 10baseT, w/ 802.3X flow control.
>    End of basic transceiver information.
> 
> libmii.c:v2.11 2/28/2005  Donald Becker (becker@...ld.com)
>  http://www.scyld.com/diag/index.html
>  MII PHY #0 transceiver registers:
>    3100 782d 0007 c0f1 05e1 cde1 0009 ffff
>    ffff ffff ffff ffff ffff ffff ffff 0000
>    0040 0002 60e0 ffff 0000 0000 0000 0000
>    ffff ffff 0000 000a 0000 00c8 0000 1058.
>  Basic mode control register 0x3100: Auto-negotiation enabled.
>  Basic mode status register 0x782d ... 782d.
>    Link status: established.
>    Capable of  100baseTx-FD 100baseTx 10baseT-FD 10baseT.
>    Able to perform Auto-negotiation, negotiation complete.
>  Vendor ID is 00:01:f0:--:--:--, model 15 rev. 1.
>    No specific information is known about this transceiver type.
>  I'm advertising 05e1: Flow-control 100baseTx-FD 100baseTx 10baseT-FD 10baseT
>    Advertising no additional info pages.
>    IEEE 802.3 CSMA/CD protocol.
>  Link partner capability is cde1: Flow-control 100baseTx-FD 100baseTx
> 10baseT-FD 10baseT.
>    Negotiation  completed.
> 
> After pinging with the Generic PHY driver:
> 
> # ethtool -S eth0 | grep error
>      tx_crc_errors: 0
>      rx_crc_errors: 0
>      rx_xdp_tx_errors: 0
>      tx_xdp_xmit_errors: 0
> 
> After pinging with the SMSC PHY driver:
> 
> # ethtool -S eth0 | grep err
>      tx_crc_errors: 0
>      IEEE_tx_macerr: 0
>      IEEE_tx_cserr: 0
>      rx_crc_errors: 19
>      IEEE_rx_macerr: 0
>      rx_xdp_tx_errors: 0
>      tx_xdp_xmit_errors: 0
> 
> Any ideas?
> 
The smsc PHY driver for LAN8720 has a number of callbacks and flags.
Try commenting them out one after the other until it works.

.read_status	= lan87xx_read_status,
.config_init	= smsc_phy_config_init,
.soft_reset	= smsc_phy_reset,
.config_aneg	= lan95xx_config_aneg_ext,
.suspend	= genphy_suspend,
.resume		= genphy_resume,
.flags		= PHY_RST_AFTER_CLK_EN,

All of them are optional. If all are commented out, you should have
the behavior of the genphy driver.

Once we know which callback is problematic, we have a starting point.

> Thanks


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ