[v2,099/148] net/ice/base: temporary workaround for E830 signed package support

Message ID 034b17c92499ba1f9b1a7970ca96f36f114a43ce.1718204529.git.anatoly.burakov@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Bruce Richardson
Headers
Series Update net/ice base driver to latest upstream snapshot |

Checks

Context Check Description
ci/checkpatch warning coding style issues

Commit Message

Burakov, Anatoly June 12, 2024, 3:01 p.m. UTC
From: Ian Stokes <ian.stokes@intel.com>

Add a workaround to deal with a signed package issue where the following
sections are in the DDP OS package, but the FW does not support.

To allow the package and FW to work togther properly, skip downloading
the unsupported sections by forcing the number of buffers in the
E830 reference signature segment to be 1 instead of 3. That will bypass
the download of the two buffers that contain the unsupported sections.

Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
---
 drivers/net/ice/base/ice_ddp.c | 3 +++
 drivers/net/ice/base/ice_ddp.h | 1 +
 2 files changed, 4 insertions(+)
  

Patch

diff --git a/drivers/net/ice/base/ice_ddp.c b/drivers/net/ice/base/ice_ddp.c
index 3271d4572d..f8cc774fea 100644
--- a/drivers/net/ice/base/ice_ddp.c
+++ b/drivers/net/ice/base/ice_ddp.c
@@ -549,6 +549,9 @@  ice_dwnld_sign_and_cfg_segs(struct ice_hw *hw, struct ice_pkg_hdr *pkg_hdr,
 	start = LE32_TO_CPU(seg->signed_buf_start);
 	count = LE32_TO_CPU(seg->signed_buf_count);
 
+	if (count == 0 && seg->seg_id == SEGMENT_TYPE_ICE_E830)
+		seg->buf_tbl.buf_count = 1;
+
 	state = ice_download_pkg_sig_seg(hw, seg);
 	if (state)
 		goto exit;
diff --git a/drivers/net/ice/base/ice_ddp.h b/drivers/net/ice/base/ice_ddp.h
index 9aa5f03559..5761920207 100644
--- a/drivers/net/ice/base/ice_ddp.h
+++ b/drivers/net/ice/base/ice_ddp.h
@@ -107,6 +107,7 @@  struct ice_generic_seg_hdr {
 #define SEGMENT_TYPE_METADATA	0x00000001
 #define SEGMENT_TYPE_ICE_E810	0x00000010
 #define SEGMENT_TYPE_SIGNING	0x00001001
+#define SEGMENT_TYPE_ICE_E830	0x00000017
 #define SEGMENT_TYPE_ICE_RUN_TIME_CFG 0x00000020
 	__le32 seg_type;
 	struct ice_pkg_ver seg_format_ver;