Merge branch 'net-stmmac-fixes-for-maximum-tx-rx-queues-to-use-by-driver'

Jakub Raczynski says:

====================
net/stmmac: Fixes for maximum TX/RX queues to use by driver

When contributing other changes preparing functions for new XGMAC hardware
https://lore.kernel.org/netdev/20260601162537.553512-1-j.raczynski@samsung.com/
there have been reports by Sashiko AI.

All of issues are wrong DTS configuration, but kernel needs to handle it.
====================

Link: https://patch.msgid.link/20260611113358.3379518-1-j.raczynski@samsung.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Jakub Kicinski 2026-06-13 16:00:33 -07:00
commit 8d2747ab8c
2 changed files with 5 additions and 5 deletions

View File

@ -4142,7 +4142,7 @@ static int __stmmac_open(struct net_device *dev,
u8 chan;
int ret;
for (int i = 0; i < MTL_MAX_TX_QUEUES; i++)
for (int i = 0; i < priv->plat->tx_queues_to_use; i++)
if (priv->dma_conf.tx_queue[i].tbs & STMMAC_TBS_EN)
dma_conf->tx_queue[i].tbs = priv->dma_conf.tx_queue[i].tbs;
memcpy(&priv->dma_conf, dma_conf, sizeof(*dma_conf));

View File

@ -156,8 +156,8 @@ static int stmmac_mtl_setup(struct platform_device *pdev,
/* Processing RX queues common config */
if (!of_property_read_u32(rx_node, "snps,rx-queues-to-use", &value)) {
if (value > U8_MAX)
value = U8_MAX;
if (value > MTL_MAX_RX_QUEUES)
value = MTL_MAX_RX_QUEUES;
plat->rx_queues_to_use = value;
}
@ -210,8 +210,8 @@ static int stmmac_mtl_setup(struct platform_device *pdev,
/* Processing TX queues common config */
if (!of_property_read_u32(tx_node, "snps,tx-queues-to-use", &value)) {
if (value > U8_MAX)
value = U8_MAX;
if (value > MTL_MAX_TX_QUEUES)
value = MTL_MAX_TX_QUEUES;
plat->tx_queues_to_use = value;
}