net/bnxt: fix initialization with old firmware
authorJay Ding <jay.ding@broadcom.com>
Tue, 20 Jul 2021 14:40:27 +0000 (14:40 +0000)
committerAjit Khaparde <ajit.khaparde@broadcom.com>
Fri, 30 Jul 2021 15:21:36 +0000 (17:21 +0200)
commitc18b1b1f99bb164e77f6a012ea37d232aba36ffa
tree0bcfc55845888e14c780ebd11de7bc5279b35920
parent6922655cad74f1f74917567181b8aa55006300de
net/bnxt: fix initialization with old firmware

Fix the resource qcap list handling to use size based on
FW response.
The size of resource qcap list could be different when FW
and application are not matching. Application should be able
to handle this scenario when the FW is older and the size of
qcap is smaller. Failure to do this causes initialization failure.

This patch is needed for backward compatibility on different
firmware versions.

Fixes: 873661aa641a1 ("net/bnxt: support shared session")
Cc: stable@dpdk.org
Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/tf_core/tf_msg.c