Skip to content

Commit 95ec1f4

Browse files
Vasundhara Volamdavem330
authored andcommitted
bnxt_en: Fix return code to "flash_device".
When NVRAM directory is not found, return the error code properly as per firmware command failure instead of the hardcode -ENOBUFS. Fixes: 3a707be ("bnxt_en: Return -EAGAIN if fw command returns BUSY") Signed-off-by: Vasundhara Volam <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent b8056e8 commit 95ec1f4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2012,11 +2012,12 @@ int bnxt_flash_package_from_file(struct net_device *dev, const char *filename,
20122012

20132013
bnxt_hwrm_fw_set_time(bp);
20142014

2015-
if (bnxt_find_nvram_item(dev, BNX_DIR_TYPE_UPDATE,
2016-
BNX_DIR_ORDINAL_FIRST, BNX_DIR_EXT_NONE,
2017-
&index, &item_len, NULL) != 0) {
2015+
rc = bnxt_find_nvram_item(dev, BNX_DIR_TYPE_UPDATE,
2016+
BNX_DIR_ORDINAL_FIRST, BNX_DIR_EXT_NONE,
2017+
&index, &item_len, NULL);
2018+
if (rc) {
20182019
netdev_err(dev, "PKG update area not created in nvram\n");
2019-
return -ENOBUFS;
2020+
return rc;
20202021
}
20212022

20222023
rc = request_firmware(&fw, filename, &dev->dev);

0 commit comments

Comments
 (0)