]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
net: usb: lan78xx: Fix suspend/resume PHY register access error
authorCristian Birsan <cristian.birsan@microchip.com>
Thu, 12 Dec 2019 11:52:47 +0000 (13:52 +0200)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 29 Jan 2020 04:45:21 +0000 (23:45 -0500)
commite574dc14993433bf684c8df0e0769522e743f837
treec068a2de2c26f77b1b0fe43b1e187308ba1ea02e
parent86a1eda8bebaf9b274a4c79a431cb35fc1ac0199
net: usb: lan78xx: Fix suspend/resume PHY register access error

BugLink: https://bugs.launchpad.net/bugs/1859712
[ Upstream commit 20032b63586ac6c28c936dff696981159913a13f ]

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: ce85e13ad6ef ("lan78xx: Update to use phylib instead of mii_if_info.")
Signed-off-by: Cristian Birsan <cristian.birsan@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/usb/lan78xx.c