netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Chan <michael.chan@broadcom.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: [PATCH net-next 04/11] bnxt_en: Add support for updating flash more securely
Date: Fri,  1 Jul 2016 18:46:22 -0400	[thread overview]
Message-ID: <1467413189-29566-5-git-send-email-michael.chan@broadcom.com> (raw)
In-Reply-To: <1467413189-29566-1-git-send-email-michael.chan@broadcom.com>

From: Rob Swindell <rob.swindell@broadcom.com>

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 <rob.swindell@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c  | 3 ++-
 drivers/net/ethernet/broadcom/bnxt/bnxt_nvm_defs.h | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
index c63ed2f..3328aa5 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
@@ -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);
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_nvm_defs.h b/drivers/net/ethernet/broadcom/bnxt/bnxt_nvm_defs.h
index 40a7b0e..73f2249 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_nvm_defs.h
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_nvm_defs.h
@@ -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,
-- 
1.8.3.1

  parent reply	other threads:[~2016-07-01 22:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-01 22:46 [PATCH net-next 00/11] bnxt_en updates for net-next Michael Chan
2016-07-01 22:46 ` [PATCH net-next 01/11] bnxt_en: VF/NPAR should return -EOPNOTSUPP for unsupported ethtool ops Michael Chan
2016-07-01 22:46 ` [PATCH net-next 02/11] bnxt_en: Update firmware spec. to 1.3.0 Michael Chan
2016-07-01 22:46 ` [PATCH net-next 03/11] bnxt_en: Do function reset on the 1st PF open only Michael Chan
2016-07-01 22:46 ` Michael Chan [this message]
2016-07-01 22:46 ` [PATCH net-next 05/11] bnxt_en: Request firmware reset after successful firwmare update Michael Chan
2016-07-01 22:46 ` [PATCH net-next 06/11] bnxt_en: Add support for firmware updates for additional processors Michael Chan
2016-07-01 22:46 ` [PATCH net-next 07/11] bnxt_en: Enable MRU enables bit when configuring VNIC MRU Michael Chan
2016-07-01 22:46 ` [PATCH net-next 08/11] bnxt_en: Increase maximum supported MTU to 9500 Michael Chan
2016-07-01 22:46 ` [PATCH net-next 09/11] bnxt_en: Allow promiscuous mode for VF if default VLAN is enabled Michael Chan
2016-07-01 22:46 ` [PATCH net-next 10/11] bnxt_en: Assign netdev->dev_port with port ID Michael Chan
2016-07-01 22:46 ` [PATCH net-next 11/11] bnxt_en: Allow statistics DMA to be configurable using ethtool -C Michael Chan
2016-07-02 18:55 ` [PATCH net-next 00/11] bnxt_en updates for net-next David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1467413189-29566-5-git-send-email-michael.chan@broadcom.com \
    --to=michael.chan@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).