]> git.baikalelectronics.ru Git - kernel.git/commit
net: usb: lan78xx: don't modify phy_device state concurrently
authorIvan T. Ivanov <iivanov@suse.de>
Wed, 4 Aug 2021 08:13:39 +0000 (11:13 +0300)
committerSasha Levin <sashal@kernel.org>
Thu, 26 Aug 2021 12:36:15 +0000 (08:36 -0400)
commit39bcd7025ed70c17a1eca89210422c02ebc0034e
tree0f54853cdd3735f90eec38846c733ee495e37639
parentdbbd65620bd3e40beb1269e151cd1ef98c588b2e
net: usb: lan78xx: don't modify phy_device state concurrently

[ Upstream commit 6b67d4d63edece1033972214704c04f36c5be89a ]

Currently phy_device state could be left in inconsistent state shown
by following alert message[1]. This is because phy_read_status could
be called concurrently from lan78xx_delayedwork, phy_state_machine and
__ethtool_get_link. Fix this by making sure that phy_device state is
updated atomically.

[1] lan78xx 1-1.1.1:1.0 eth0: No phy led trigger registered for speed(-1)

Signed-off-by: Ivan T. Ivanov <iivanov@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/usb/lan78xx.c