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 2/2] net: usb: ax88179_178a: avoid two consecutive device resets
Date: Thu, 16 Nov 2023 10:42:42 +0100 [thread overview]
Message-ID: <020ff11184bb22909287ef68d97c00f7d2c73bd6.camel@redhat.com> (raw)
In-Reply-To: <20231114125111.313229-3-jtornosm@redhat.com>
On Tue, 2023-11-14 at 13:50 +0100, Jose Ignacio Tornos Martinez wrote:
> The device is always reset two consecutive times (ax88179_reset is called
> twice), one from usbnet_probe during the device binding and the other from
> usbnet_open.
>
> Let only the reset during the device binding to prepare the device as soon
> as possible and not repeat the reset operation (tested with generic ASIX
> Electronics Corp. AX88179 Gigabit Ethernet device).
>
> 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 a suitable Fixes tag even here ;)
> ---
> drivers/net/usb/ax88179_178a.c | 13 -------------
> 1 file changed, 13 deletions(-)
>
> diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c
> index 4ea0e155bb0d..864c6fc2db33 100644
> --- a/drivers/net/usb/ax88179_178a.c
> +++ b/drivers/net/usb/ax88179_178a.c
> @@ -1678,7 +1678,6 @@ static const struct driver_info ax88179_info = {
> .unbind = ax88179_unbind,
> .status = ax88179_status,
> .link_reset = ax88179_link_reset,
> - .reset = ax88179_reset,
> .stop = ax88179_stop,
> .flags = FLAG_ETHER | FLAG_FRAMING_AX,
> .rx_fixup = ax88179_rx_fixup,
This looks potentially dangerous, as the device will not get a reset in
down/up cycles; *possibly* dropping the reset call from ax88179_bind()
would be safer.
In both cases touching so many H/W variant with testing available on a
single one sounds dangerous. Is the unneeded 2nd reset causing any
specific issue?
Thanks,
Paolo
next prev parent reply other threads:[~2023-11-16 9:42 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
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 [this message]
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=020ff11184bb22909287ef68d97c00f7d2c73bd6.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).