From: Dan Nowlin <dan.now...@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. Fixes: 3cbdb0343022 ("ice: Add support for E830 DDP package segment") Reviewed-by: Przemek Kitszel <przemyslaw.kits...@intel.com> Signed-off-by: Dan Nowlin <dan.now...@intel.com> Signed-off-by: Paul Greenwalt <paul.greenw...@intel.com> --- drivers/net/ethernet/intel/ice/ice_ddp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/intel/ice/ice_ddp.c b/drivers/net/ethernet/intel/ice/ice_ddp.c index 8b7504a9df31..90b9e28ddba9 100644 --- a/drivers/net/ethernet/intel/ice/ice_ddp.c +++ b/drivers/net/ethernet/intel/ice/ice_ddp.c @@ -1424,14 +1424,14 @@ ice_dwnld_sign_and_cfg_segs(struct ice_hw *hw, struct ice_pkg_hdr *pkg_hdr, goto exit; } - conf_idx = le32_to_cpu(seg->signed_seg_idx); - start = le32_to_cpu(seg->signed_buf_start); count = le32_to_cpu(seg->signed_buf_count); - state = ice_download_pkg_sig_seg(hw, seg); - if (state) + if (state || !count) goto exit; + conf_idx = le32_to_cpu(seg->signed_seg_idx); + start = le32_to_cpu(seg->signed_buf_start); + state = ice_download_pkg_config_seg(hw, pkg_hdr, conf_idx, start, count); -- 2.41.0