Skip to content

Commit 2ab560a

Browse files
jacob-kellerdavem330
authored andcommitted
ice: add flags indicating pending update of firmware module
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 544cd2a commit 2ab560a

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

drivers/net/ethernet/intel/ice/ice_adminq_cmd.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,12 @@ struct ice_aqc_list_caps_elem {
109109
#define ICE_AQC_CAPS_MSIX 0x0043
110110
#define ICE_AQC_CAPS_FD 0x0045
111111
#define ICE_AQC_CAPS_MAX_MTU 0x0047
112+
#define ICE_AQC_CAPS_NVM_VER 0x0048
113+
#define ICE_AQC_CAPS_PENDING_NVM_VER 0x0049
114+
#define ICE_AQC_CAPS_OROM_VER 0x004A
115+
#define ICE_AQC_CAPS_PENDING_OROM_VER 0x004B
116+
#define ICE_AQC_CAPS_NET_VER 0x004C
117+
#define ICE_AQC_CAPS_PENDING_NET_VER 0x004D
112118
#define ICE_AQC_CAPS_NVM_MGMT 0x0080
113119

114120
u8 major_ver;

drivers/net/ethernet/intel/ice/ice_common.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1857,6 +1857,18 @@ ice_parse_common_caps(struct ice_hw *hw, struct ice_hw_common_caps *caps,
18571857
"%s: msix_vector_first_id = %d\n", prefix,
18581858
caps->msix_vector_first_id);
18591859
break;
1860+
case ICE_AQC_CAPS_PENDING_NVM_VER:
1861+
caps->nvm_update_pending_nvm = true;
1862+
ice_debug(hw, ICE_DBG_INIT, "%s: update_pending_nvm\n", prefix);
1863+
break;
1864+
case ICE_AQC_CAPS_PENDING_OROM_VER:
1865+
caps->nvm_update_pending_orom = true;
1866+
ice_debug(hw, ICE_DBG_INIT, "%s: update_pending_orom\n", prefix);
1867+
break;
1868+
case ICE_AQC_CAPS_PENDING_NET_VER:
1869+
caps->nvm_update_pending_netlist = true;
1870+
ice_debug(hw, ICE_DBG_INIT, "%s: update_pending_netlist\n", prefix);
1871+
break;
18601872
case ICE_AQC_CAPS_NVM_MGMT:
18611873
caps->nvm_unified_update =
18621874
(number & ICE_NVM_MGMT_UNIFIED_UPD_SUPPORT) ?

drivers/net/ethernet/intel/ice/ice_type.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,12 @@ struct ice_hw_common_caps {
245245

246246
u8 dcb;
247247

248+
bool nvm_update_pending_nvm;
249+
bool nvm_update_pending_orom;
250+
bool nvm_update_pending_netlist;
251+
#define ICE_NVM_PENDING_NVM_IMAGE BIT(0)
252+
#define ICE_NVM_PENDING_OROM BIT(1)
253+
#define ICE_NVM_PENDING_NETLIST BIT(2)
248254
bool nvm_unified_update;
249255
#define ICE_NVM_MGMT_UNIFIED_UPD_SUPPORT BIT(3)
250256
};

0 commit comments

Comments
 (0)