netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	linux-usb@vger.kernel.org,  netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: weihao.bj@ieisystem.com
Subject: Re: [PATCH 1/2] net: usb: ax88179_178a: fix failed operations during ax88179_reset
Date: Thu, 16 Nov 2023 10:37:55 +0100	[thread overview]
Message-ID: <d17b696c81a57fb857b54a8c05e121be1cfc47fa.camel@redhat.com> (raw)
In-Reply-To: <20231114125111.313229-2-jtornosm@redhat.com>

On Tue, 2023-11-14 at 13:50 +0100, Jose Ignacio Tornos Martinez wrote:
> Using generic ASIX Electronics Corp. AX88179 Gigabit Ethernet device,
> the following test cycle has been implemented:
>     - power on
>     - check logs
>     - shutdown
>     - after detecting the system shutdown, disconnect power
>     - after approximately 60 seconds of sleep, power is restored
> Running some cycles, sometimes error logs like this appear:
>     kernel: ax88179_178a 2-9:1.0 (unnamed net_device) (uninitialized): Failed to write reg index 0x0001: -19
>     kernel: ax88179_178a 2-9:1.0 (unnamed net_device) (uninitialized): Failed to read reg index 0x0001: -19
>     ...
> These failed operation are happening during ax88179_reset execution, so
> the initialization could not be correct.
> 
> In order to avoid this, we need to increase the delay after reset and
> clock initial operations. By using these larger values, many cycles
> have been run and no failed operations appear.
> 
> Reported-by: Herb Wei <weihao.bj@ieisystem.com>
> Tested-by: Herb Wei <weihao.bj@ieisystem.com>
> Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>

We need at least a suitable Fixes tag

> ---
>  drivers/net/usb/ax88179_178a.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c
> index aff39bf3161d..4ea0e155bb0d 100644
> --- a/drivers/net/usb/ax88179_178a.c
> +++ b/drivers/net/usb/ax88179_178a.c
> @@ -1583,11 +1583,11 @@ static int ax88179_reset(struct usbnet *dev)
>  
>  	*tmp16 = AX_PHYPWR_RSTCTL_IPRL;
>  	ax88179_write_cmd(dev, AX_ACCESS_MAC, AX_PHYPWR_RSTCTL, 2, 2, tmp16);
> -	msleep(200);
> +	msleep(500);

Do you know if there is some status register you can query for 'reset
completed'? or some official documentation you can quote for the above
delay?

Thanks!

Paolo


  reply	other threads:[~2023-11-16  9:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-14 12:50 [PATCH 0/2] net: usb: ax88179_178a: fix and improve reset procedure Jose Ignacio Tornos Martinez
2023-11-14 12:50 ` [PATCH 1/2] net: usb: ax88179_178a: fix failed operations during ax88179_reset Jose Ignacio Tornos Martinez
2023-11-16  9:37   ` Paolo Abeni [this message]
2023-11-16 13:50     ` Jose Ignacio Tornos Martinez
2023-11-14 12:50 ` [PATCH 2/2] net: usb: ax88179_178a: avoid two consecutive device resets Jose Ignacio Tornos Martinez
2023-11-16  9:42   ` Paolo Abeni
2023-11-16 14:18     ` Jose Ignacio Tornos Martinez
2023-11-20 12:06     ` [PATCH v2 1/2] net: usb: ax88179_178a: fix failed operations during ax88179_reset Jose Ignacio Tornos Martinez
2023-11-21 22:40       ` patchwork-bot+netdevbpf
2023-11-21 22:40       ` patchwork-bot+netdevbpf
2023-11-20 12:11     ` [PATCH v2 2/2] net: usb: ax88179_178a: avoid two consecutive device resets Jose Ignacio Tornos Martinez

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=d17b696c81a57fb857b54a8c05e121be1cfc47fa.camel@redhat.com \
    --to=pabeni@redhat.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jtornosm@redhat.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=weihao.bj@ieisystem.com \
    /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 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).