mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 03:35:32 -04:00
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>
This commit is contained in:
committed by
Jakub Kicinski
parent
5262eab946
commit
227fdb2fe6
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user