]> git.baikalelectronics.ru Git - kernel.git/commit
alx: use fine-grained locking instead of RTNL
authorJohannes Berg <johannes@sipsolutions.net>
Wed, 12 May 2021 10:19:50 +0000 (12:19 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 May 2021 20:09:26 +0000 (13:09 -0700)
commitf4eba221099ea34fd6f61f6aa77f14a09d4406bb
tree7deb194ed59fdaba246ea550c62845ed9f317aba
parentab26e58e9fe28cbc201f4a3e3512b9c3b8ba8bb3
alx: use fine-grained locking instead of RTNL

In the alx driver, all locking depended on the RTNL, but
that causes issues with ipconfig ("ip=..." command line)
because that waits for the netdev to have a carrier while
holding the RTNL, but the alx workers etc. require RTNL,
so the carrier won't be set until the RTNL is dropped and
can be acquired by alx workers. This causes long delays
at boot, as reported by Nikolai Zhubr.

Really the only sensible thing to do here is to not use
the RTNL for everything, but instead have fine-grained
locking for just the driver. Do that, it's not that hard.

Reported-by: Nikolai Zhubr <zhubr.2@gmail.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/atheros/alx/alx.h
drivers/net/ethernet/atheros/alx/ethtool.c
drivers/net/ethernet/atheros/alx/main.c