Skip to content

Commit 02468e9

Browse files
Paolo Abenigregkh
authored andcommitted
Revert "net: usb: asix: ax88772: drop phylink use in PM to avoid MDIO runtime PM wakeups"
commit 63a7965 upstream. This reverts commit 5537a46 ("net: usb: asix: ax88772: drop phylink use in PM to avoid MDIO runtime PM wakeups"), it breaks operation of asix ethernet usb dongle after system suspend-resume cycle. Link: https://lore.kernel.org/all/b5ea8296-f981-445d-a09a-2f389d7f6fdd@samsung.com/ Fixes: 5537a46 ("net: usb: asix: ax88772: drop phylink use in PM to avoid MDIO runtime PM wakeups") Reported-by: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Jakub Kicinski <kuba@kernel.org> Link: https://patch.msgid.link/2945b9dbadb8ee1fee058b19554a5cb14f1763c1.1757601118.git.pabeni@redhat.com Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent bfb9520 commit 02468e9

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

drivers/net/usb/asix_devices.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,8 +607,15 @@ 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;
610611
u16 medium;
611612

613+
if (netif_running(dev->net)) {
614+
rtnl_lock();
615+
phylink_suspend(priv->phylink, false);
616+
rtnl_unlock();
617+
}
618+
612619
/* Stop MAC operation */
613620
medium = asix_read_medium_status(dev, 1);
614621
medium &= ~AX_MEDIUM_RE;
@@ -637,6 +644,12 @@ static void ax88772_resume(struct usbnet *dev)
637644
for (i = 0; i < 3; i++)
638645
if (!priv->reset(dev, 1))
639646
break;
647+
648+
if (netif_running(dev->net)) {
649+
rtnl_lock();
650+
phylink_resume(priv->phylink);
651+
rtnl_unlock();
652+
}
640653
}
641654

642655
static int asix_resume(struct usb_interface *intf)

0 commit comments

Comments
 (0)