提交 a4c36347 编写于 作者: R Rob Swindell 提交者: David S. Miller

bnxt_en: Add support for updating flash more securely

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: NRob Swindell <rob.swindell@broadcom.com>
Signed-off-by: NMichael Chan <michael.chan@broadcom.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 2a5bedfa
...@@ -1186,7 +1186,8 @@ static int bnxt_flash_firmware_from_file(struct net_device *dev, ...@@ -1186,7 +1186,8 @@ static int bnxt_flash_firmware_from_file(struct net_device *dev,
const struct firmware *fw; const struct firmware *fw;
int rc; 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; return -EINVAL;
rc = request_firmware(&fw, filename, &dev->dev); rc = request_firmware(&fw, filename, &dev->dev);
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
enum bnxt_nvm_directory_type { enum bnxt_nvm_directory_type {
BNX_DIR_TYPE_UNUSED = 0, BNX_DIR_TYPE_UNUSED = 0,
BNX_DIR_TYPE_PKG_LOG = 1, BNX_DIR_TYPE_PKG_LOG = 1,
BNX_DIR_TYPE_UPDATE = 2,
BNX_DIR_TYPE_CHIMP_PATCH = 3, BNX_DIR_TYPE_CHIMP_PATCH = 3,
BNX_DIR_TYPE_BOOTCODE = 4, BNX_DIR_TYPE_BOOTCODE = 4,
BNX_DIR_TYPE_VPD = 5, BNX_DIR_TYPE_VPD = 5,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册