Skip to content

Commit 54ff1e3

Browse files
Kalesh APdavem330
authored andcommitted
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 <[email protected]> Reviewed-by: Edwin Peer <[email protected]> Signed-off-by: Kalesh AP <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 8e42aef commit 54ff1e3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2609,6 +2609,10 @@ int bnxt_flash_package_from_fw_obj(struct net_device *dev, const struct firmware
26092609
cmd_err = ((struct hwrm_err_output *)resp)->cmd_err;
26102610

26112611
switch (cmd_err) {
2612+
case NVM_INSTALL_UPDATE_CMD_ERR_CODE_ANTI_ROLLBACK:
2613+
netdev_err(dev, "HWRM_NVM_INSTALL_UPDATE failure Anti-rollback detected\n");
2614+
rc = -EALREADY;
2615+
break;
26122616
case NVM_INSTALL_UPDATE_CMD_ERR_CODE_FRAG_ERR:
26132617
install->flags =
26142618
cpu_to_le16(NVM_INSTALL_UPDATE_REQ_FLAGS_ALLOWED_TO_DEFRAG);

0 commit comments

Comments
 (0)