]> git.baikalelectronics.ru Git - kernel.git/commit
net: usb: asix: replace mii_nway_restart in resume path
authorAlexander Couzens <lynxis@fe80.eu>
Tue, 17 Jul 2018 11:17:09 +0000 (13:17 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Jul 2018 20:43:16 +0000 (13:43 -0700)
commit134d7aee190968bcdf8627f445da3287612ae083
tree1225823c2a44aaddaf6f0532b9c3a66ee2bafe8a
parentf09085e1b2fe7b6032b9b6bd4fe83756f6561b42
net: usb: asix: replace mii_nway_restart in resume path

mii_nway_restart is not pm aware which results in a rtnl deadlock.
Implement mii_nway_restart manual by setting BMCR_ANRESTART if
BMCR_ANENABLE is set.

To reproduce:
* plug an asix based usb network interface
* wait until the device enters PM (~5 sec)
* `ip link set eth1 up` will never return

Fixes: a80da59df198 ("net: asix: Add in_pm parameter")
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/asix_devices.c