[PATCH v3 072/129] net/ice/base: fix package download algorithm

Anatoly Burakov anatoly.burakov at intel.com
Tue Jun 25 13:13:17 CEST 2024


From: Dan Nowlin <dan.nowlin at intel.com>

Previously, the code would assume that only "Modular Signature Segment"
existed. Given a package with both a "Reference Signature Segment" and a
"Modular Signature Segment" the download would not have been successful
because an incorrect sequence of buffers would be sent to the firmware.

Update download flow to detect a "Reference Signature Segment" and to
only download the buffers in the signature segment in this case, and to
skip downloading any buffers from the configuration segment.

Signed-off-by: Dan Nowlin <dan.nowlin at intel.com>
Signed-off-by: Ian Stokes <ian.stokes at intel.com>
---
 drivers/net/ice/base/ice_ddp.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/ice/base/ice_ddp.c b/drivers/net/ice/base/ice_ddp.c
index 5a0cf4d54f..b57c67d849 100644
--- a/drivers/net/ice/base/ice_ddp.c
+++ b/drivers/net/ice/base/ice_ddp.c
@@ -568,6 +568,14 @@ ice_dwnld_sign_and_cfg_segs(struct ice_hw *hw, struct ice_pkg_hdr *pkg_hdr,
 	if (state)
 		goto exit;
 
+	if (count == 0) {
+		/* this is a "Reference Signature Segment" and download should
+		 * be only for the buffers in the signature segment (and not
+		 * the hardware configuration segment)
+		 */
+		goto exit;
+	}
+
 	state = ice_download_pkg_config_seg(hw, pkg_hdr, conf_idx, start,
 					    count);
 
-- 
2.43.0



More information about the dev mailing list