summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorKalesh AP <kalesh-anakkur.purayil@broadcom.com>2022-03-05 03:54:35 -0500
committerDavid S. Miller <davem@davemloft.net>2022-03-05 11:16:55 +0000
commit54ff1e3e8fc3aad09d5dfc426bb462e261c37a1b (patch)
treee6e87f292b258dec7282bd3d34546fb813459e79 /drivers
parent8e42aef0b7307c024bedf8716628392977f27f55 (diff)
bnxt_en: add more error checks to HWRM_NVM_INSTALL_UPDATE
FW returns error code "NVM_INSTALL_UPDATE_CMD_ERR_CODE_ANTI_ROLLBACK" in the response to indicate that HWRM_NVM_INSTALL_UPDATE command has failed due to Anti-rollback feature. Parse the error and return an appropriate error code to the user. Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com> Reviewed-by: Edwin Peer <edwin.peer@broadcom.com> Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
index 59838a4f45fb..a3151af9a279 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
@@ -2609,6 +2609,10 @@ int bnxt_flash_package_from_fw_obj(struct net_device *dev, const struct firmware
cmd_err = ((struct hwrm_err_output *)resp)->cmd_err;
switch (cmd_err) {
+ case NVM_INSTALL_UPDATE_CMD_ERR_CODE_ANTI_ROLLBACK:
+ netdev_err(dev, "HWRM_NVM_INSTALL_UPDATE failure Anti-rollback detected\n");
+ rc = -EALREADY;
+ break;
case NVM_INSTALL_UPDATE_CMD_ERR_CODE_FRAG_ERR:
install->flags =
cpu_to_le16(NVM_INSTALL_UPDATE_REQ_FLAGS_ALLOWED_TO_DEFRAG);