Skip to content

Commit 6d51d44

Browse files
DanNowlinkuba-moo
authored andcommitted
ice: Fix package download algorithm
Previously, the driver assumed that all signature segments would contain one or more buffers to download. In the future, there will be signature segments that will contain no buffers to download. Correct download flow to allow for signature segments that have zero download buffers and skip the download in this case. Fixes: 3cbdb03 ("ice: Add support for E830 DDP package segment") Reviewed-by: Przemek Kitszel <[email protected]> Signed-off-by: Dan Nowlin <[email protected]> Signed-off-by: Paul Greenwalt <[email protected]> Reviewed-by: Paul Menzel <[email protected]> Tested-by: Pucha Himasekhar Reddy <[email protected]> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 5e69ff8 commit 6d51d44

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1424,14 +1424,14 @@ ice_dwnld_sign_and_cfg_segs(struct ice_hw *hw, struct ice_pkg_hdr *pkg_hdr,
14241424
goto exit;
14251425
}
14261426

1427-
conf_idx = le32_to_cpu(seg->signed_seg_idx);
1428-
start = le32_to_cpu(seg->signed_buf_start);
14291427
count = le32_to_cpu(seg->signed_buf_count);
1430-
14311428
state = ice_download_pkg_sig_seg(hw, seg);
1432-
if (state)
1429+
if (state || !count)
14331430
goto exit;
14341431

1432+
conf_idx = le32_to_cpu(seg->signed_seg_idx);
1433+
start = le32_to_cpu(seg->signed_buf_start);
1434+
14351435
state = ice_download_pkg_config_seg(hw, pkg_hdr, conf_idx, start,
14361436
count);
14371437

0 commit comments

Comments
 (0)