From: Heiner Kallweit <hkallweit1@gmail.com>
To: Fabio Estevam <festevam@gmail.com>
Cc: Russell King - ARM Linux <linux@armlinux.org.uk>,
edumazet <edumazet@google.com>, netdev <netdev@vger.kernel.org>,
Andrew Lunn <andrew@lunn.ch>
Subject: Re: LAN8720: RX errors / packet loss when using smsc PHY driver on i.MX6Q
Date: Fri, 14 Nov 2025 22:33:31 +0100 [thread overview]
Message-ID: <1ec7a98b-ed61-4faf-8a0f-ec0443c9195e@gmail.com> (raw)
In-Reply-To: <CAOMZO5BEcoQSLJpGUtsfiNXPUMVP3kbs1n9KXZxaWBzifZHoZw@mail.gmail.com>
On 11/14/2025 10:15 PM, Fabio Estevam wrote:
> Hi Andrew,
>
> On Thu, Nov 13, 2025 at 7:35 PM Andrew Lunn <andrew@lunn.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@scyld.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@scyld.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
next prev parent reply other threads:[~2025-11-14 21:33 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-13 22:25 LAN8720: RX errors / packet loss when using smsc PHY driver on i.MX6Q Fabio Estevam
2025-11-13 22:35 ` Andrew Lunn
2025-11-14 21:15 ` Fabio Estevam
2025-11-14 21:33 ` Heiner Kallweit [this message]
2025-11-14 21:48 ` Florian Fainelli
2025-11-14 22:48 ` Andrew Lunn
2025-11-15 21:01 ` Fabio Estevam
2025-11-15 21:26 ` Heiner Kallweit
2025-11-15 21:54 ` Fabio Estevam
2025-11-15 22:01 ` Russell King (Oracle)
2025-11-15 22:25 ` Fabio Estevam
2025-11-15 21:37 ` Russell King (Oracle)
2025-11-16 0:57 ` Fabio Estevam
2025-11-16 2:14 ` Fabio Estevam
2025-11-16 15:55 ` Andrew Lunn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1ec7a98b-ed61-4faf-8a0f-ec0443c9195e@gmail.com \
--to=hkallweit1@gmail.com \
--cc=andrew@lunn.ch \
--cc=edumazet@google.com \
--cc=festevam@gmail.com \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).