All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wojciech Drewek <wojciech.drewek@intel.com>
To: Brett Creeley <bcreeley@amd.com>, <netdev@vger.kernel.org>
Cc: intel-wired-lan@lists.osuosl.org
Subject: Re: [Intel-wired-lan] [PATCH iwl-net] ice: implement AQ download pkg retry
Date: Fri, 17 May 2024 09:49:04 +0200	[thread overview]
Message-ID: <eb7293ac-3674-4e89-a11d-a8b8fd470dcd@intel.com> (raw)
In-Reply-To: <342a9b10-97d7-4720-92ef-a548179b990f@amd.com>



On 16.05.2024 18:36, Brett Creeley wrote:
> 
> 
> On 5/16/2024 7:04 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.
>>
>> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
>> Signed-off-by: Wojciech Drewek <wojciech.drewek@intel.com>
>> ---
>>   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..19e2111fcf08 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)
> 
> Are these the only 2 sporadic errors that FW will return?

Yes, that's right. We don't want to retry in case of other errors since those might be valid.

> 
>> +                               break;
>> +
>> +                       try_cnt++;
>> +                       msleep(20);
>> +               }
>> +
>> +               if (try_cnt)
>> +                       dev_dbg(ice_hw_to_dev(hw),
>> +                               "ice_aq_download_pkg failed, number of retries: %d\n",
>> +                               try_cnt);
> 
> If try_cnt is non-zero it doesn't mean the last download failed, it just means one or more attempts to download failed right? Maybe just "ice_aq_download_pkg number of retries: %d" since the if (status) check below will print on failure?

Sounds reasonable, we want this log only because we want to know if we hit this sporadic failure.

> 
>>
>>                  /* Save AQ status from download package */
>>                  if (status) {
>> -- 
>> 2.40.1
>>
>>

WARNING: multiple messages have this Message-ID (diff)
From: Wojciech Drewek <wojciech.drewek@intel.com>
To: Brett Creeley <bcreeley@amd.com>, <netdev@vger.kernel.org>
Cc: <intel-wired-lan@lists.osuosl.org>
Subject: Re: [PATCH iwl-net] ice: implement AQ download pkg retry
Date: Fri, 17 May 2024 09:49:04 +0200	[thread overview]
Message-ID: <eb7293ac-3674-4e89-a11d-a8b8fd470dcd@intel.com> (raw)
In-Reply-To: <342a9b10-97d7-4720-92ef-a548179b990f@amd.com>



On 16.05.2024 18:36, Brett Creeley wrote:
> 
> 
> On 5/16/2024 7:04 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.
>>
>> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
>> Signed-off-by: Wojciech Drewek <wojciech.drewek@intel.com>
>> ---
>>   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..19e2111fcf08 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)
> 
> Are these the only 2 sporadic errors that FW will return?

Yes, that's right. We don't want to retry in case of other errors since those might be valid.

> 
>> +                               break;
>> +
>> +                       try_cnt++;
>> +                       msleep(20);
>> +               }
>> +
>> +               if (try_cnt)
>> +                       dev_dbg(ice_hw_to_dev(hw),
>> +                               "ice_aq_download_pkg failed, number of retries: %d\n",
>> +                               try_cnt);
> 
> If try_cnt is non-zero it doesn't mean the last download failed, it just means one or more attempts to download failed right? Maybe just "ice_aq_download_pkg number of retries: %d" since the if (status) check below will print on failure?

Sounds reasonable, we want this log only because we want to know if we hit this sporadic failure.

> 
>>
>>                  /* Save AQ status from download package */
>>                  if (status) {
>> -- 
>> 2.40.1
>>
>>

  reply	other threads:[~2024-05-17  7:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-16 14:04 [Intel-wired-lan] [PATCH iwl-net] ice: implement AQ download pkg retry Wojciech Drewek
2024-05-16 14:04 ` Wojciech Drewek
2024-05-16 14:56 ` [Intel-wired-lan] " Simon Horman
2024-05-16 14:56   ` Simon Horman
2024-05-17  7:42   ` [Intel-wired-lan] " Wojciech Drewek
2024-05-17  7:42     ` Wojciech Drewek
2024-05-16 16:36 ` [Intel-wired-lan] " Brett Creeley
2024-05-16 16:36   ` Brett Creeley
2024-05-17  7:49   ` Wojciech Drewek [this message]
2024-05-17  7:49     ` Wojciech Drewek
2024-05-17  8:29     ` [Intel-wired-lan] " Przemek Kitszel
2024-05-17  8:29       ` Przemek Kitszel
2024-05-17  7:26 ` Naveen Mamindlapalli
2024-05-17  7:26   ` Naveen Mamindlapalli
2024-05-17  7:51   ` [Intel-wired-lan] " Wojciech Drewek
2024-05-17  7:51     ` Wojciech Drewek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=eb7293ac-3674-4e89-a11d-a8b8fd470dcd@intel.com \
    --to=wojciech.drewek@intel.com \
    --cc=bcreeley@amd.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.