[PATCH net] net: enetc: fix the output issue of 'ethtool --show-ring'

Wei Fang
2026-03-19T07:25:25Z

Currently, enetc_get_ringparam() only provides rx_pending and tx_pending,
but 'ethtool --show-ring' no longer displays these fields. Because the
ringparam retrieval path has moved to the new netlink interface, where
rings_fill_reply() emits rx_pending/tx_pending only if the corresponding
rx_max_pending/tx_max_pending values are non-zero. So rx_max_pending and
tx_max_pending to are added to enetc_get_ringparam() to fix the issue.

Fixes: e4a1717b677c ("ethtool: provide ring sizes with RINGS_GET request")
Signed-off-by: Wei Fang <wei.fang@nxp.com>
---
drivers/net/ethernet/freescale/enetc/enetc_ethtool.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c b/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c
index fed89d4f1e1d..0818a6e8e6db 100644
--- a/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c
+++ b/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c
@@ -813,6 +813,8 @@ static void enetc_get_ringparam(struct net_device *ndev,
{
struct enetc_ndev_priv *priv = netdev_priv(ndev);

+ ring->rx_max_pending = SZ_64K;
+ ring->tx_max_pending = SZ_64K;
ring->rx_pending = priv->rx_bd_count;
ring->tx_pending = priv->tx_bd_count;

--
2.34.1