Skip to content

Commit 20f8928

Browse files
oleremgregkh
authored andcommitted
net: usb: asix: ax88772: drop phylink use in PM to avoid MDIO runtime PM wakeups
commit 5537a46 upstream. Drop phylink_{suspend,resume}() from ax88772 PM callbacks. MDIO bus accesses have their own runtime-PM handling and will try to wake the device if it is suspended. Such wake attempts must not happen from PM callbacks while the device PM lock is held. Since phylink {sus|re}sume may trigger MDIO, it must not be called in PM context. No extra phylink PM handling is required for this driver: - .ndo_open/.ndo_stop control the phylink start/stop lifecycle. - ethtool/phylib entry points run in process context, not PM. - phylink MAC ops program the MAC on link changes after resume. Fixes: e0bffe3 ("net: asix: ax88772: migrate to phylink") Reported-by: Hubert Wiśniewski <hubert.wisniewski.25632@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Tested-by: Hubert Wiśniewski <hubert.wisniewski.25632@gmail.com> Tested-by: Xu Yang <xu.yang_2@nxp.com> Link: https://patch.msgid.link/20250908112619.2900723-1-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 3605455 commit 20f8928

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

drivers/net/usb/asix_devices.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -607,15 +607,8 @@ static const struct net_device_ops ax88772_netdev_ops = {
607607

608608
static void ax88772_suspend(struct usbnet *dev)
609609
{
610-
struct asix_common_private *priv = dev->driver_priv;
611610
u16 medium;
612611

613-
if (netif_running(dev->net)) {
614-
rtnl_lock();
615-
phylink_suspend(priv->phylink, false);
616-
rtnl_unlock();
617-
}
618-
619612
/* Stop MAC operation */
620613
medium = asix_read_medium_status(dev, 1);
621614
medium &= ~AX_MEDIUM_RE;
@@ -644,12 +637,6 @@ static void ax88772_resume(struct usbnet *dev)
644637
for (i = 0; i < 3; i++)
645638
if (!priv->reset(dev, 1))
646639
break;
647-
648-
if (netif_running(dev->net)) {
649-
rtnl_lock();
650-
phylink_resume(priv->phylink);
651-
rtnl_unlock();
652-
}
653640
}
654641

655642
static int asix_resume(struct usb_interface *intf)

0 commit comments

Comments
 (0)