mirror of
https://github.com/torvalds/linux.git
synced 2026-07-29 02:31:27 +02:00
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:
commit
8d2747ab8c
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user