diff options
author | David S. Miller <davem@davemloft.net> | 2019-08-19 11:54:03 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-08-19 11:54:03 -0700 |
commit | 446bf64b613c4433dac4b15f4eaf326beaad3c8e (patch) | |
tree | b20b9457234f6f9a5d7464213ef6d10f95f3eed3 /drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | |
parent | 20e79a0a2cfd15b6cfb18119f2e108396be56716 (diff) | |
parent | 06821504fd47a5e5b641aeeb638a0ae10a216ef8 (diff) | |
download | blackbird-op-linux-446bf64b613c4433dac4b15f4eaf326beaad3c8e.tar.gz blackbird-op-linux-446bf64b613c4433dac4b15f4eaf326beaad3c8e.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Merge conflict of mlx5 resolved using instructions in merge
commit 9566e650bf7fdf58384bb06df634f7531ca3a97e.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c index 3a3d8a9be5ed..b624174c8594 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c @@ -2072,21 +2072,19 @@ static int bnxt_flash_package_from_file(struct net_device *dev, mutex_lock(&bp->hwrm_cmd_lock); hwrm_err = _hwrm_send_message(bp, &install, sizeof(install), INSTALL_PACKAGE_TIMEOUT); - if (hwrm_err) - goto flash_pkg_exit; - - if (resp->error_code) { + if (hwrm_err) { u8 error_code = ((struct hwrm_err_output *)resp)->cmd_err; - if (error_code == NVM_INSTALL_UPDATE_CMD_ERR_CODE_FRAG_ERR) { + if (resp->error_code && error_code == + NVM_INSTALL_UPDATE_CMD_ERR_CODE_FRAG_ERR) { install.flags |= cpu_to_le16( NVM_INSTALL_UPDATE_REQ_FLAGS_ALLOWED_TO_DEFRAG); hwrm_err = _hwrm_send_message(bp, &install, sizeof(install), INSTALL_PACKAGE_TIMEOUT); - if (hwrm_err) - goto flash_pkg_exit; } + if (hwrm_err) + goto flash_pkg_exit; } if (resp->result) { |