]> Gentwo Git Trees - linux/.git/commit
bnxt_en: Improve bnxt_backing_store_cfg_v2()
authorMichael Chan <michael.chan@broadcom.com>
Wed, 17 Sep 2025 04:08:33 +0000 (21:08 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 18 Sep 2025 11:09:42 +0000 (13:09 +0200)
commitde6768750319eb2a3ced020585f9481a2ee961fa
tree87216dc492efb175a9ea29c80e7f533bc1cd57a5
parent21b6b8e8b344ec99777ebb349647b2069297188c
bnxt_en: Improve bnxt_backing_store_cfg_v2()

Improve the logic that determines the last_type in this function.
The different context memory types are configured in a loop.  The
last_type signals the last context memory type to be configured
which requires the ALL_DONE flag to be set for the FW.

The existing logic makes some assumptions that TIM is the last_type
when RDMA is enabled or FTQM is the last_type when only L2 is
enabled.  Improve it to just search for the last_type so that we
don't need to make these assumptions that won't necessary be true
for future devices.

Reviewed-by: Shruti Parab <shruti.parab@broadcom.com>
Reviewed-by: Hongguang Gao <hongguang.gao@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Link: https://patch.msgid.link/20250917040839.1924698-5-michael.chan@broadcom.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/broadcom/bnxt/bnxt.c