[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f8f953d5-a35a-4054-a853-3b04ae9b2c67@lunn.ch>
Date: Tue, 10 Jun 2025 14:36:21 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Oleksij Rempel <o.rempel@...gutronix.de>
Cc: Heiner Kallweit <hkallweit1@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
kernel@...gutronix.de, linux-kernel@...r.kernel.org,
Russell King <linux@...linux.org.uk>, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v1 2/3] net: phy: micrel: Add RX error counter
support for KSZ9477 switch-integrated PHYs
On Tue, Jun 10, 2025 at 11:13:53AM +0200, Oleksij Rempel wrote:
> Add support for tracking receive error statistics from PHYs integrated
> into the KSZ9477 family of Ethernet switches.
>
> The integrated PHYs expose a receive error (RXER) counter in register 0x15.
> This counter increments when the PHY detects one or more symbol errors
> on a received frame. The register is cleared upon reading.
>
> Changes include:
> - `kszphy_update_stats()` to accumulate the RX error count.
> - `kszphy_get_phy_stats()` to expose this count via ethtool PHY stats.
> - Addition of a private `rx_err_pkt_cnt` field in the driver.
> - Registration of `.update_stats` and `.get_phy_stats` callbacks in the
> KSZ9477 PHY driver structure.
>
> The functionality of this counter was confirmed by physically disturbing
> the signal lines - specifically by wiggling exposed twisted pair wires and
> intentionally shorting between pairs. These actions triggered RXER
> increments, validating the counter's behavior.
>
> This RXER counter is confirmed for KSZ9477 and likely applicable to
> other related PHYs like those in KSZ9313.
>
> Signed-off-by: Oleksij Rempel <o.rempel@...gutronix.de>
Reviewed-by: Andrew Lunn <andrew@...n.ch>
Andrew
Powered by blists - more mailing lists