]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethernet: stmmac: remove private tx queue lock
authorLino Sanfilippo <LinoSanfilippo@gmx.de>
Thu, 8 Dec 2016 23:55:43 +0000 (00:55 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 11 Dec 2016 04:26:54 +0000 (23:26 -0500)
commit2de6bb9e7dfe3b8a9c49cd16434378f2aa6cdcd3
tree28c1ccf8e8bd0a4a8afe6490d13fb96fac931699
parent7c91c96e9ccca503f8aa58cc2a549f843dc600fb
net: ethernet: stmmac: remove private tx queue lock

The driver uses a private lock for synchronization of the xmit function and
the xmit completion handler, but since the NETIF_F_LLTX flag is not set,
the xmit function is also called with the xmit_lock held.

On the other hand the completion handler uses the reverse locking order by
first taking the private lock and (in case that the tx queue had been
stopped) then the xmit_lock.

Improve the locking by removing the private lock and using only the
xmit_lock for synchronization instead.

Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac.h
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c