From: Jacob Keller <jacob.e.keller@intel.com>
To: netdev@vger.kernel.org
Cc: Jakub Kicinski <kubakici@wp.pl>, Jiri Pirko <jiri@resnulli.us>,
Tom Herbert <tom@herbertland.com>,
Jacob Keller <jacob.e.keller@intel.com>
Subject: [RFC PATCH net-next v2 3/6] ice: add flags indicating pending update of firmware module
Date: Fri, 17 Jul 2020 11:35:38 -0700 [thread overview]
Message-ID: <20200717183541.797878-4-jacob.e.keller@intel.com> (raw)
In-Reply-To: <20200717183541.797878-1-jacob.e.keller@intel.com>
After a flash update, the pending status of the update can be determined
from the device capabilities.
Read the appropriate device capability and store whether there is
a pending update awaiting a reboot.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
---
drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 6 ++++++
drivers/net/ethernet/intel/ice/ice_common.c | 12 ++++++++++++
drivers/net/ethernet/intel/ice/ice_type.h | 6 ++++++
3 files changed, 24 insertions(+)
diff --git a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
index d81ee985a2c3..a35739d726a7 100644
--- a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
+++ b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
@@ -109,6 +109,12 @@ struct ice_aqc_list_caps_elem {
#define ICE_AQC_CAPS_MSIX 0x0043
#define ICE_AQC_CAPS_FD 0x0045
#define ICE_AQC_CAPS_MAX_MTU 0x0047
+#define ICE_AQC_CAPS_NVM_VER 0x0048
+#define ICE_AQC_CAPS_PENDING_NVM_VER 0x0049
+#define ICE_AQC_CAPS_OROM_VER 0x004A
+#define ICE_AQC_CAPS_PENDING_OROM_VER 0x004B
+#define ICE_AQC_CAPS_NET_VER 0x004C
+#define ICE_AQC_CAPS_PENDING_NET_VER 0x004D
#define ICE_AQC_CAPS_NVM_MGMT 0x0080
u8 major_ver;
diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c
index ffa7490b5789..2e9a43bae67f 100644
--- a/drivers/net/ethernet/intel/ice/ice_common.c
+++ b/drivers/net/ethernet/intel/ice/ice_common.c
@@ -1855,6 +1855,18 @@ ice_parse_common_caps(struct ice_hw *hw, struct ice_hw_common_caps *caps,
"%s: msix_vector_first_id = %d\n", prefix,
caps->msix_vector_first_id);
break;
+ case ICE_AQC_CAPS_PENDING_NVM_VER:
+ caps->nvm_update_pending_nvm = true;
+ ice_debug(hw, ICE_DBG_INIT, "%s: update_pending_nvm\n", prefix);
+ break;
+ case ICE_AQC_CAPS_PENDING_OROM_VER:
+ caps->nvm_update_pending_orom = true;
+ ice_debug(hw, ICE_DBG_INIT, "%s: update_pending_orom\n", prefix);
+ break;
+ case ICE_AQC_CAPS_PENDING_NET_VER:
+ caps->nvm_update_pending_netlist = true;
+ ice_debug(hw, ICE_DBG_INIT, "%s: update_pending_netlist\n", prefix);
+ break;
case ICE_AQC_CAPS_NVM_MGMT:
caps->nvm_unified_update =
(number & ICE_NVM_MGMT_UNIFIED_UPD_SUPPORT) ?
diff --git a/drivers/net/ethernet/intel/ice/ice_type.h b/drivers/net/ethernet/intel/ice/ice_type.h
index 4314da808679..714bb5749fd4 100644
--- a/drivers/net/ethernet/intel/ice/ice_type.h
+++ b/drivers/net/ethernet/intel/ice/ice_type.h
@@ -263,6 +263,12 @@ struct ice_hw_common_caps {
u8 dcb;
+ bool nvm_update_pending_nvm;
+ bool nvm_update_pending_orom;
+ bool nvm_update_pending_netlist;
+#define ICE_NVM_PENDING_NVM_IMAGE BIT(0)
+#define ICE_NVM_PENDING_OROM BIT(1)
+#define ICE_NVM_PENDING_NETLIST BIT(2)
bool nvm_unified_update;
#define ICE_NVM_MGMT_UNIFIED_UPD_SUPPORT BIT(3)
};
--
2.27.0.353.gb9a2d1a0207f
next prev parent reply other threads:[~2020-07-17 18:35 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-17 18:35 [RFC PATCH net-next v2 0/6] introduce PLDM firmware update library Jacob Keller
2020-07-17 18:35 ` [RFC PATCH net-next v2 1/6] ice: Add support for unified NVM update flow capability Jacob Keller
2020-07-17 18:35 ` [RFC PATCH net-next v2 2/6] ice: Add AdminQ commands for FW update Jacob Keller
2020-07-17 18:35 ` Jacob Keller [this message]
2020-07-17 18:35 ` [RFC PATCH net-next v2 4/6] Add pldmfw library for PLDM firmware update Jacob Keller
2020-07-17 18:35 ` [RFC PATCH net-next v2 5/6] ice: implement device flash update via devlink Jacob Keller
2020-07-20 5:26 ` kernel test robot
2020-07-23 23:33 ` Jacob Keller
2020-07-17 18:35 ` [RFC PATCH net-next v2 6/6] devlink: add overwrite mode to flash update Jacob Keller
2020-07-20 10:09 ` Jiri Pirko
2020-07-20 15:51 ` Jakub Kicinski
2020-07-20 18:52 ` Jacob Keller
2020-07-21 13:56 ` Jiri Pirko
2020-07-21 17:28 ` Jacob Keller
2020-07-21 13:53 ` Jiri Pirko
2020-07-21 17:04 ` Jakub Kicinski
2020-07-21 17:31 ` Jacob Keller
2020-07-22 10:51 ` Jiri Pirko
2020-07-22 15:30 ` Keller, Jacob E
2020-07-22 16:52 ` Jakub Kicinski
2020-07-22 18:21 ` Jacob Keller
2020-07-26 7:18 ` Jiri Pirko
2020-07-27 18:11 ` Jacob Keller
2020-07-29 22:49 ` Jacob Keller
2020-07-29 23:16 ` Jakub Kicinski
2020-07-29 23:59 ` Jacob Keller
2020-07-26 7:16 ` Jiri Pirko
2020-07-27 18:13 ` Jacob Keller
2020-07-28 11:19 ` Jiri Pirko
2020-07-28 16:58 ` Jacob Keller
2020-07-28 17:09 ` Jakub Kicinski
2020-07-28 17:43 ` Jacob Keller
2020-07-28 22:59 ` Jacob Keller
2020-07-17 19:58 ` [RFC PATCH net-next v2 0/6] introduce PLDM firmware update library Jakub Kicinski
2020-07-17 21:00 ` Keller, Jacob E
2020-07-17 21:08 ` Keller, Jacob E
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=20200717183541.797878-4-jacob.e.keller@intel.com \
--to=jacob.e.keller@intel.com \
--cc=jiri@resnulli.us \
--cc=kubakici@wp.pl \
--cc=netdev@vger.kernel.org \
--cc=tom@herbertland.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.