From: Andrew Lunn <andrew@lunn.ch>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
kernel@pengutronix.de, linux-kernel@vger.kernel.org,
Russell King <linux@armlinux.org.uk>,
netdev@vger.kernel.org
Subject: Re: [PATCH net-next v1 2/3] net: phy: micrel: Add RX error counter support for KSZ9477 switch-integrated PHYs
Date: Tue, 10 Jun 2025 14:36:21 +0200 [thread overview]
Message-ID: <f8f953d5-a35a-4054-a853-3b04ae9b2c67@lunn.ch> (raw)
In-Reply-To: <20250610091354.4060454-3-o.rempel@pengutronix.de>
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@pengutronix.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
next prev parent reply other threads:[~2025-06-10 12:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-10 9:13 [PATCH net-next v1 0/3] net: phy: micrel: add extended PHY support for KSZ9477-class devices Oleksij Rempel
2025-06-10 9:13 ` [PATCH net-next v1 1/3] net: phy: micrel: add MDI/MDI-X control support for KSZ9477 switch-integrated PHYs Oleksij Rempel
2025-06-10 12:31 ` Andrew Lunn
2025-06-10 12:46 ` Oleksij Rempel
2025-06-10 13:12 ` Andrew Lunn
2025-06-10 9:13 ` [PATCH net-next v1 2/3] net: phy: micrel: Add RX error counter " Oleksij Rempel
2025-06-10 12:36 ` Andrew Lunn [this message]
2025-06-10 9:13 ` [PATCH net-next v1 3/3] net: phy: micrel: add cable test support for KSZ9477-class PHYs Oleksij Rempel
2025-06-10 12:38 ` Andrew Lunn
2025-06-12 0:40 ` [PATCH net-next v1 0/3] net: phy: micrel: add extended PHY support for KSZ9477-class devices patchwork-bot+netdevbpf
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=f8f953d5-a35a-4054-a853-3b04ae9b2c67@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=pabeni@redhat.com \
/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
all inboxes | Powered by JetHome®