Re: [PATCH] net: stmmac: dwmac-loongson: Set correct {tx,rx}_fifo_size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 21 Jan 2025 17:37:03 +0800 Huacai Chen wrote:
> Now for dwmac-loongson {tx,rx}_fifo_size are uninitialised, which means
> zero. This means dwmac-loongson doesn't support changing MTU, 

Please provide more details here than "doesn't support changing".
Does it return an error every time, but the device is operating
correctly?

Do the flow control thresholds also get programmed incorrectly?

> so set the
> correct tx_fifo_size and rx_fifo_size for it (16KB multiplied by channel
> counts).
> 
> Note: the Fixes tag is not exactly right, but it is a key commit of the
> dwmac-loongson series.

Please pick a better one, then. Oldest commit where issue can be
observed by the user is usually a safe choice.

Please use 12 chars of the hash in the tag.

> +	plat->tx_fifo_size = SZ_16K * plat->tx_queues_to_use;
> +	plat->rx_fifo_size = SZ_16K * plat->rx_queues_to_use;

Is this really right? 16k times the number of queues seems like you're
just trying to get the main driver to calculate 16k. 
What if user decreases the queue count? Maybe you should add a way to
communicate the fifo size regardless of the queue count to the main
driver?
-- 
pw-bot: cr




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux