]> git.ipfire.org Git - thirdparty/linux.git/commit
bnxt_en: set backing store type from query type
authorPengpeng Hou <pengpeng@iscas.ac.cn>
Sat, 28 Mar 2026 23:43:56 +0000 (07:43 +0800)
committerJakub Kicinski <kuba@kernel.org>
Tue, 31 Mar 2026 00:59:13 +0000 (17:59 -0700)
commit4ee937107d52f9e5c350e4b5e629760e328b3d9f
treeb3dd64c24d2aed3c6e422f1b9b3527b255ff4329
parentcedc1bf327de62ec30af9743bd1f601c2de30553
bnxt_en: set backing store type from query type

bnxt_hwrm_func_backing_store_qcaps_v2() stores resp->type from the
firmware response in ctxm->type and later uses that value to index
fixed backing-store metadata arrays such as ctx_arr[] and
bnxt_bstore_to_trace[].

ctxm->type is fixed by the current backing-store query type and matches
the array index of ctx->ctx_arr. Set ctxm->type from the current loop
variable instead of depending on resp->type.

Also update the loop to advance type from next_valid_type in the for
statement, which keeps the control flow simpler for non-valid and
unchanged entries.

Fixes: 6a4d0774f02d ("bnxt_en: Add support for new backing store query firmware API")
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Reviewed-by: Michael Chan <michael.chan@broadcom.com>
Tested-by: Michael Chan <michael.chan@broadcom.com>
Link: https://patch.msgid.link/20260328234357.43669-1-pengpeng@iscas.ac.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c