intel-wired-lan.lists.osuosl.org archive mirror
 help / color / mirror / Atom feed
* [Intel-wired-lan] [PATCH iwl-next v2] ice: Fix package download algorithm
@ 2024-03-26 20:59 Paul Greenwalt
  2024-03-28  6:09 ` Paul Menzel
  2024-05-08 16:01 ` Pucha, HimasekharX Reddy
  0 siblings, 2 replies; 3+ messages in thread
From: Paul Greenwalt @ 2024-03-26 20:59 UTC (permalink / raw)
  To: intel-wired-lan; +Cc: Dan Nowlin, Paul Greenwalt, Przemek Kitszel

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

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: 3cbdb0343022 ("ice: Add support for E830 DDP package segment")
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Paul Greenwalt <paul.greenwalt@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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Intel-wired-lan] [PATCH iwl-next v2] ice: Fix package download algorithm
  2024-03-26 20:59 [Intel-wired-lan] [PATCH iwl-next v2] ice: Fix package download algorithm Paul Greenwalt
@ 2024-03-28  6:09 ` Paul Menzel
  2024-05-08 16:01 ` Pucha, HimasekharX Reddy
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Menzel @ 2024-03-28  6:09 UTC (permalink / raw)
  To: Paul Greenwalt; +Cc: Dan Nowlin, intel-wired-lan, Przemek Kitszel

Dear Paul, dear Dan,


Thank you for the patch.

Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>


Kind regards,

Paul

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Intel-wired-lan] [PATCH iwl-next v2] ice: Fix package download algorithm
  2024-03-26 20:59 [Intel-wired-lan] [PATCH iwl-next v2] ice: Fix package download algorithm Paul Greenwalt
  2024-03-28  6:09 ` Paul Menzel
@ 2024-05-08 16:01 ` Pucha, HimasekharX Reddy
  1 sibling, 0 replies; 3+ messages in thread
From: Pucha, HimasekharX Reddy @ 2024-05-08 16:01 UTC (permalink / raw)
  To: Greenwalt, Paul, intel-wired-lan
  Cc: Nowlin, Dan, Greenwalt, Paul, Kitszel, Przemyslaw

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of Paul Greenwalt
> Sent: Wednesday, March 27, 2024 2:30 AM
> To: intel-wired-lan@lists.osuosl.org
> Cc: Nowlin, Dan <dan.nowlin@intel.com>; Greenwalt, Paul <paul.greenwalt@intel.com>; Kitszel, Przemyslaw <przemyslaw.kitszel@intel.com>
> Subject: [Intel-wired-lan] [PATCH iwl-next v2] ice: Fix package download algorithm
>
> From: Dan Nowlin <dan.nowlin@intel.com>
>
> 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: 3cbdb0343022 ("ice: Add support for E830 DDP package segment")
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
> Signed-off-by: Paul Greenwalt <paul.greenwalt@intel.com>
> ---
>  drivers/net/ethernet/intel/ice/ice_ddp.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>

Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-05-08 16:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-26 20:59 [Intel-wired-lan] [PATCH iwl-next v2] ice: Fix package download algorithm Paul Greenwalt
2024-03-28  6:09 ` Paul Menzel
2024-05-08 16:01 ` Pucha, HimasekharX Reddy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).