Commit 8dbf0c75 authored by Huacai Chen's avatar Huacai Chen Committed by Jakub Kicinski
Browse files

net: stmmac: dwmac-loongson: Set correct {tx,rx}_fifo_size



Now for dwmac-loongson {tx,rx}_fifo_size are uninitialised, which means
zero. This means dwmac-loongson doesn't support changing MTU because in
stmmac_change_mtu() it requires the fifo size be no less than MTU. Thus,
set the correct tx_fifo_size and rx_fifo_size for it (16KB multiplied by
queue counts).

Here {tx,rx}_fifo_size is initialised with the initial value (also the
maximum value) of {tx,rx}_queues_to_use. So it will keep as 16KB if we
don't change the queue count, and will be larger than 16KB if we change
(decrease) the queue count. However stmmac_change_mtu() still work well
with current logic (MTU cannot be larger than 16KB for stmmac).

Note: the Fixes tag picked here is the oldest commit and key commit of
the dwmac-loongson series "stmmac: Add Loongson platform support".

Acked-by: default avatarYanteng Si <si.yanteng@linux.dev>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Signed-off-by: default avatarChong Qiao <qiaochong@loongson.cn>
Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
Link: https://patch.msgid.link/20250210134328.2755328-1-chenhuacai@loongson.cn


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 23fc9311
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment