]> www.infradead.org Git - users/dwmw2/linux.git/commit
net: stmmac: Limit FIFO size by hardware capability
authorKunihiko Hayashi <hayashi.kunihiko@socionext.com>
Mon, 27 Jan 2025 01:38:19 +0000 (10:38 +0900)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 28 Jan 2025 11:44:43 +0000 (12:44 +0100)
commit044f2fbaa2725696ecbf1f02ba7ab0a8ccb7e1ae
tree215c773028f588de01d27481e6ac543d7a412dba
parentf5fb35a3d6b36d378b2e2ecbfb9caa337d5428e6
net: stmmac: Limit FIFO size by hardware capability

Tx/Rx FIFO size is specified by the parameter "{tx,rx}-fifo-depth" from
stmmac_platform layer.

However, these values are constrained by upper limits determined by the
capabilities of each hardware feature. There is a risk that the upper
bits will be truncated due to the calculation, so it's appropriate to
limit them to the upper limit values and display a warning message.

This only works if the hardware capability has the upper limit values.

Fixes: e7877f52fd4a ("stmmac: Read tx-fifo-depth and rx-fifo-depth from the devicetree")
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Reviewed-by: Yanteng Si <si.yanteng@linux.dev>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c