From: Andrew Lunn <andrew@lunn.ch>
To: Xu Yang <xu.yang_2@nxp.com>
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, max.schulze@online.de,
khalasa@piap.pl, o.rempel@pengutronix.de,
linux-usb@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, imx@lists.linux.dev,
jun.li@nxp.com
Subject: Re: [PATCH] net: usb: asix: avoid to call phylink_stop() a second time
Date: Wed, 6 Aug 2025 17:58:18 +0200 [thread overview]
Message-ID: <a28f38d5-215b-49fb-aad7-66e0a30247b9@lunn.ch> (raw)
In-Reply-To: <20250806083017.3289300-1-xu.yang_2@nxp.com>
On Wed, Aug 06, 2025 at 04:30:17PM +0800, Xu Yang wrote:
> The kernel will have below dump when system resume if the USB net device
> was already disconnected during system suspend.
By disconnected, you mean pulled out?
> It's because usb_resume_interface() will be skipped if the USB core found
> the USB device was already disconnected. In this case, asix_resume() will
> not be called anymore. So asix_suspend/resume() can't be balanced. When
> ax88772_stop() is called, the phy device was already stopped. To avoid
> calling phylink_stop() a second time, check whether usb net device is
> already in suspend state.
>
> Fixes: e0bffe3e6894 ("net: asix: ax88772: migrate to phylink")
> Cc: stable@vger.kernel.org
> Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
> ---
> drivers/net/usb/asix_devices.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c
> index 9b0318fb50b5..ac28f5fe7ac2 100644
> --- a/drivers/net/usb/asix_devices.c
> +++ b/drivers/net/usb/asix_devices.c
> @@ -932,7 +932,8 @@ static int ax88772_stop(struct usbnet *dev)
> {
> struct asix_common_private *priv = dev->driver_priv;
>
> - phylink_stop(priv->phylink);
> + if (!dev->suspend_count)
> + phylink_stop(priv->phylink);
Looking at ax88172a.c, lan78xx.c and smsc95xx.c, they don't have
anything like this. Is asix special, or are all the others broken as
well?
Andrew
next prev parent reply other threads:[~2025-08-06 15:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-06 8:30 Xu Yang
2025-08-06 15:58 ` Andrew Lunn [this message]
2025-08-07 4:03 ` Xu Yang
2025-08-15 8:15 ` Xu Yang
2025-08-15 12:59 ` Andrew Lunn
2025-08-18 6:44 ` Xu Yang
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=a28f38d5-215b-49fb-aad7-66e0a30247b9@lunn.ch \
--to=andrew@lunn.ch \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=imx@lists.linux.dev \
--cc=jun.li@nxp.com \
--cc=khalasa@piap.pl \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=max.schulze@online.de \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=pabeni@redhat.com \
--cc=xu.yang_2@nxp.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
all inboxes | Powered by JetHome®