]> 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)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Aug 2021 11:51:14 +0000 (12:51 +0100)
commit0c2e529b726735d421b583e92af1d3f93a2e3441
tree68a5c88229e74f91f392bce451c45c93912fb645
parent3177ea61b92b1ac927be00c4358da76f1c4f0669
net: usb: lan78xx: don't modify phy_device state concurrently

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>
drivers/net/usb/lan78xx.c