summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorThéo Lebrun <theo.lebrun@bootlin.com>2026-08-12 10:03:21 +0200
committerJakub Kicinski <kuba@kernel.org>2026-08-17 17:19:56 -0700
commit227fdb2fe6f9d3dcc337b91acb1237582899b0d7 (patch)
treece72c3c08835a20087fb048d9b2c4f2ca3cd0608 /drivers
parent5262eab9462adffd73a84409dee0cbf57fe31da3 (diff)
net: macb: refuse set_ringparam on EMAC
EMAC has never supported changing ring sizes: RX is hardcoded to 9 and TX is the tiniest ring buffer you can imagine. Make sure the operation fails early rather than silently succeed and storing values in bp->configured_{rx,tx}_ring_size that are never read in the EMAC case. Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com> Link: https://patch.msgid.link/20260812-macb-context-v9-7-7ddbf5f715e0@bootlin.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/cadence/macb_main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index af351d30adab..1476bce77f34 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -3687,6 +3687,9 @@ static int macb_set_ringparam(struct net_device *netdev,
u32 new_rx_size, new_tx_size;
unsigned int reset = 0;
+ if (bp->caps & MACB_CAPS_MACB_IS_EMAC)
+ return -EOPNOTSUPP;
+
if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending))
return -EINVAL;