netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iwl-net v2] ice: implement AQ download pkg retry
@ 2024-05-20 10:37 Wojciech Drewek
  2024-05-20 16:04 ` Brett Creeley
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Wojciech Drewek @ 2024-05-20 10:37 UTC (permalink / raw)
  To: netdev; +Cc: intel-wired-lan, naveenm, bcreeley, przemyslaw.kitszel

ice_aqc_opc_download_pkg (0x0C40) AQ sporadically returns error due
to FW issue. Fix this by retrying five times before moving to
Safe Mode.

Fixes: c76488109616 ("ice: Implement Dynamic Device Personalization (DDP) download")
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Signed-off-by: Wojciech Drewek <wojciech.drewek@intel.com>
---
v2: remove "failure" from log message
---
 drivers/net/ethernet/intel/ice/ice_ddp.c | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_ddp.c b/drivers/net/ethernet/intel/ice/ice_ddp.c
index ce5034ed2b24..77b81e5a5a44 100644
--- a/drivers/net/ethernet/intel/ice/ice_ddp.c
+++ b/drivers/net/ethernet/intel/ice/ice_ddp.c
@@ -1339,6 +1339,7 @@ ice_dwnld_cfg_bufs_no_lock(struct ice_hw *hw, struct ice_buf *bufs, u32 start,
 
 	for (i = 0; i < count; i++) {
 		bool last = false;
+		int try_cnt = 0;
 		int status;
 
 		bh = (struct ice_buf_hdr *)(bufs + start + i);
@@ -1346,8 +1347,22 @@ ice_dwnld_cfg_bufs_no_lock(struct ice_hw *hw, struct ice_buf *bufs, u32 start,
 		if (indicate_last)
 			last = ice_is_last_download_buffer(bh, i, count);
 
-		status = ice_aq_download_pkg(hw, bh, ICE_PKG_BUF_SIZE, last,
-					     &offset, &info, NULL);
+		while (try_cnt < 5) {
+			status = ice_aq_download_pkg(hw, bh, ICE_PKG_BUF_SIZE,
+						     last, &offset, &info,
+						     NULL);
+			if (hw->adminq.sq_last_status != ICE_AQ_RC_ENOSEC &&
+			    hw->adminq.sq_last_status != ICE_AQ_RC_EBADSIG)
+				break;
+
+			try_cnt++;
+			msleep(20);
+		}
+
+		if (try_cnt)
+			dev_dbg(ice_hw_to_dev(hw),
+				"ice_aq_download_pkg number of retries: %d\n",
+				try_cnt);
 
 		/* Save AQ status from download package */
 		if (status) {
-- 
2.40.1


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

* Re: [PATCH iwl-net v2] ice: implement AQ download pkg retry
  2024-05-20 10:37 [PATCH iwl-net v2] ice: implement AQ download pkg retry Wojciech Drewek
@ 2024-05-20 16:04 ` Brett Creeley
  2024-05-28 16:00 ` [Intel-wired-lan] " Pucha, HimasekharX Reddy
  2024-05-31 18:36 ` Simon Horman
  2 siblings, 0 replies; 5+ messages in thread
From: Brett Creeley @ 2024-05-20 16:04 UTC (permalink / raw)
  To: Wojciech Drewek, netdev; +Cc: intel-wired-lan, naveenm, przemyslaw.kitszel



On 5/20/2024 3:37 AM, Wojciech Drewek wrote:
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
> 
> 
> ice_aqc_opc_download_pkg (0x0C40) AQ sporadically returns error due
> to FW issue. Fix this by retrying five times before moving to
> Safe Mode.
> 
> Fixes: c76488109616 ("ice: Implement Dynamic Device Personalization (DDP) download")
> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> Signed-off-by: Wojciech Drewek <wojciech.drewek@intel.com>
> ---
> v2: remove "failure" from log message
> ---
>   drivers/net/ethernet/intel/ice/ice_ddp.c | 19 +++++++++++++++++--
>   1 file changed, 17 insertions(+), 2 deletions(-)

LGTM.

Reviewed-by: Brett Creeley <brett.creeley@amd.com>

> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_ddp.c b/drivers/net/ethernet/intel/ice/ice_ddp.c
> index ce5034ed2b24..77b81e5a5a44 100644
> --- a/drivers/net/ethernet/intel/ice/ice_ddp.c
> +++ b/drivers/net/ethernet/intel/ice/ice_ddp.c
> @@ -1339,6 +1339,7 @@ ice_dwnld_cfg_bufs_no_lock(struct ice_hw *hw, struct ice_buf *bufs, u32 start,
> 
>          for (i = 0; i < count; i++) {
>                  bool last = false;
> +               int try_cnt = 0;
>                  int status;
> 
>                  bh = (struct ice_buf_hdr *)(bufs + start + i);
> @@ -1346,8 +1347,22 @@ ice_dwnld_cfg_bufs_no_lock(struct ice_hw *hw, struct ice_buf *bufs, u32 start,
>                  if (indicate_last)
>                          last = ice_is_last_download_buffer(bh, i, count);
> 
> -               status = ice_aq_download_pkg(hw, bh, ICE_PKG_BUF_SIZE, last,
> -                                            &offset, &info, NULL);
> +               while (try_cnt < 5) {
> +                       status = ice_aq_download_pkg(hw, bh, ICE_PKG_BUF_SIZE,
> +                                                    last, &offset, &info,
> +                                                    NULL);
> +                       if (hw->adminq.sq_last_status != ICE_AQ_RC_ENOSEC &&
> +                           hw->adminq.sq_last_status != ICE_AQ_RC_EBADSIG)
> +                               break;
> +
> +                       try_cnt++;
> +                       msleep(20);
> +               }
> +
> +               if (try_cnt)
> +                       dev_dbg(ice_hw_to_dev(hw),
> +                               "ice_aq_download_pkg number of retries: %d\n",
> +                               try_cnt);
> 
>                  /* Save AQ status from download package */
>                  if (status) {
> --
> 2.40.1
> 

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

* RE: [Intel-wired-lan] [PATCH iwl-net v2] ice: implement AQ download pkg retry
  2024-05-20 10:37 [PATCH iwl-net v2] ice: implement AQ download pkg retry Wojciech Drewek
  2024-05-20 16:04 ` Brett Creeley
@ 2024-05-28 16:00 ` Pucha, HimasekharX Reddy
  2024-05-31 18:36 ` Simon Horman
  2 siblings, 0 replies; 5+ messages in thread
From: Pucha, HimasekharX Reddy @ 2024-05-28 16:00 UTC (permalink / raw)
  To: Drewek, Wojciech, netdev@vger.kernel.org
  Cc: bcreeley@amd.com, naveenm@marvell.com,
	intel-wired-lan@lists.osuosl.org, Kitszel, Przemyslaw

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of Wojciech Drewek
> Sent: Monday, May 20, 2024 4:07 PM
> To: netdev@vger.kernel.org
> Cc: bcreeley@amd.com; naveenm@marvell.com; intel-wired-lan@lists.osuosl.org; Kitszel, Przemyslaw <przemyslaw.kitszel@intel.com>
> Subject: [Intel-wired-lan] [PATCH iwl-net v2] ice: implement AQ download pkg retry
>
> ice_aqc_opc_download_pkg (0x0C40) AQ sporadically returns error due to FW issue. Fix this by retrying five times before moving to Safe Mode.
>
> Fixes: c76488109616 ("ice: Implement Dynamic Device Personalization (DDP) download")
> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> Signed-off-by: Wojciech Drewek <wojciech.drewek@intel.com>
> ---
> v2: remove "failure" from log message
> ---
>  drivers/net/ethernet/intel/ice/ice_ddp.c | 19 +++++++++++++++++--
>  1 file changed, 17 insertions(+), 2 deletions(-)
>

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


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

* Re: [PATCH iwl-net v2] ice: implement AQ download pkg retry
  2024-05-20 10:37 [PATCH iwl-net v2] ice: implement AQ download pkg retry Wojciech Drewek
  2024-05-20 16:04 ` Brett Creeley
  2024-05-28 16:00 ` [Intel-wired-lan] " Pucha, HimasekharX Reddy
@ 2024-05-31 18:36 ` Simon Horman
  2024-05-31 20:47   ` Simon Horman
  2 siblings, 1 reply; 5+ messages in thread
From: Simon Horman @ 2024-05-31 18:36 UTC (permalink / raw)
  To: Wojciech Drewek
  Cc: netdev, intel-wired-lan, naveenm, bcreeley, przemyslaw.kitszel

On Mon, May 20, 2024 at 12:37:00PM +0200, Wojciech Drewek wrote:
> ice_aqc_opc_download_pkg (0x0C40) AQ sporadically returns error due
> to FW issue. Fix this by retrying five times before moving to
> Safe Mode.
> 
> Fixes: c76488109616 ("ice: Implement Dynamic Device Personalization (DDP) download")
> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> Signed-off-by: Wojciech Drewek <wojciech.drewek@intel.com>

Reviewed-by: Simon Horman <horms@kernel.org>


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

* Re: [PATCH iwl-net v2] ice: implement AQ download pkg retry
  2024-05-31 18:36 ` Simon Horman
@ 2024-05-31 20:47   ` Simon Horman
  0 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2024-05-31 20:47 UTC (permalink / raw)
  To: Wojciech Drewek
  Cc: netdev, intel-wired-lan, naveenm, bcreeley, przemyslaw.kitszel

On Fri, May 31, 2024 at 07:36:05PM +0100, Simon Horman wrote:
> On Mon, May 20, 2024 at 12:37:00PM +0200, Wojciech Drewek wrote:
> > ice_aqc_opc_download_pkg (0x0C40) AQ sporadically returns error due
> > to FW issue. Fix this by retrying five times before moving to
> > Safe Mode.
> > 
> > Fixes: c76488109616 ("ice: Implement Dynamic Device Personalization (DDP) download")
> > Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> > Signed-off-by: Wojciech Drewek <wojciech.drewek@intel.com>
> 
> Reviewed-by: Simon Horman <horms@kernel.org>

Sorry, please ignore that.
I seem to have managed to respond to a stale patch.

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

end of thread, other threads:[~2024-05-31 20:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-20 10:37 [PATCH iwl-net v2] ice: implement AQ download pkg retry Wojciech Drewek
2024-05-20 16:04 ` Brett Creeley
2024-05-28 16:00 ` [Intel-wired-lan] " Pucha, HimasekharX Reddy
2024-05-31 18:36 ` Simon Horman
2024-05-31 20:47   ` Simon Horman

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).