Skip to content

Commit 22ecab4

Browse files
committed
net: usb: lan78xx: Fix suspend/resume PHY register access error
Lan78xx driver accesses the PHY registers through MDIO bus over USB connection. When performing a suspend/resume, the PHY registers can be accessed before the USB connection is resumed. This will generate an error and will prevent the device to resume correctly. This patch adds the dependency between the MDIO bus and USB device to allow correct handling of suspend/resume. Fixes: ce85e13 ("lan78xx: Update to use phylib instead of mii_if_info.") Signed-off-by: Cristian Birsan <cristian.birsan@microchip.com>
1 parent e318512 commit 22ecab4

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/net/usb/lan78xx.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1820,6 +1820,7 @@ static int lan78xx_mdio_init(struct lan78xx_net *dev)
18201820
dev->mdiobus->read = lan78xx_mdiobus_read;
18211821
dev->mdiobus->write = lan78xx_mdiobus_write;
18221822
dev->mdiobus->name = "lan78xx-mdiobus";
1823+
dev->mdiobus->parent = &dev->udev->dev;
18231824

18241825
snprintf(dev->mdiobus->id, MII_BUS_ID_SIZE, "usb-%03d:%03d",
18251826
dev->udev->bus->busnum, dev->udev->devnum);

0 commit comments

Comments
 (0)