]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
bnxt_en: Fix trimming of P5 RX and TX rings
authorMichael Chan <michael.chan@broadcom.com>
Tue, 12 Dec 2023 00:51:10 +0000 (16:51 -0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 13 Dec 2023 00:05:57 +0000 (16:05 -0800)
commitf1e50b276d37f21b10c4d122e02a81cd202cde3b
tree2022dd1f210255b94ec8b8f68a6e537002d57345
parent79ac11393328fb1717d17c12e3c0eef0e9fa0647
bnxt_en: Fix trimming of P5 RX and TX rings

The recent commit to trim the RX and TX rings on P5 chips by assigning
each with max CP rings divided by 2 is not correct.  Max CP rings
divided by 2 may be bigger than the original RX or TX and would
lead to failure.  In other words, we may be checking for increased
RX/TX rings than required and it may fail.

Fix it by calling __bnxt_trim_rings() instead that would properly
trim RX and TX without the possibility of increasing their values.

Fixes: f5b29c6afe36 ("bnxt_en: Add helper to get the number of CP rings required for TX rings")
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Link: https://lore.kernel.org/r/20231212005122.2401-2-michael.chan@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c