net: stmmac: Specify hardware capability value when FIFO size isn't specified
authorKunihiko Hayashi <hayashi.kunihiko@socionext.com>
Mon, 27 Jan 2025 01:38:20 +0000 (10:38 +0900)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 28 Jan 2025 11:44:43 +0000 (12:44 +0100)
commit8865d22656b442b8d0fb019e6acb2292b99a9c3c
tree857f3b6b975a29b85e1aa28cd85130e8d99c889b
parent044f2fbaa2725696ecbf1f02ba7ab0a8ccb7e1ae
net: stmmac: Specify hardware capability value when FIFO size isn't specified

When Tx/Rx FIFO size is not specified in advance, the driver checks if
the value is zero and sets the hardware capability value in functions
where that value is used.

Consolidate the check and settings into function stmmac_hw_init() and
remove redundant other statements.

If FIFO size is zero and the hardware capability also doesn't have upper
limit values, return with an error message.

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