Skip to content

Commit

Permalink
bnxt_en: Add support for updating flash more securely
Browse files Browse the repository at this point in the history
To support Secure Firmware Update, we must be able to allocate
a staging area in the Flash.  This patch adds support for the
"update" type to tell firmware to do that.

Signed-off-by: Rob Swindell <[email protected]>
Signed-off-by: Michael Chan <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Rob Swindell authored and davem330 committed Jul 2, 2016
1 parent 2a5bedf commit a4c3634
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -1186,7 +1186,8 @@ static int bnxt_flash_firmware_from_file(struct net_device *dev,
const struct firmware *fw;
int rc;

if (bnxt_dir_type_is_executable(dir_type) == false)
if (dir_type != BNX_DIR_TYPE_UPDATE &&
bnxt_dir_type_is_executable(dir_type) == false)
return -EINVAL;

rc = request_firmware(&fw, filename, &dev->dev);
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/broadcom/bnxt/bnxt_nvm_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
enum bnxt_nvm_directory_type {
BNX_DIR_TYPE_UNUSED = 0,
BNX_DIR_TYPE_PKG_LOG = 1,
BNX_DIR_TYPE_UPDATE = 2,
BNX_DIR_TYPE_CHIMP_PATCH = 3,
BNX_DIR_TYPE_BOOTCODE = 4,
BNX_DIR_TYPE_VPD = 5,
Expand Down

0 comments on commit a4c3634

Please sign in to comment.