Commit 2219d5ed authored by Lino Sanfilippo's avatar Lino Sanfilippo Committed by David S. Miller

net: ethernet: altera: TSE: do not use tx queue lock in tx completion handler

The driver already uses its private lock for synchronization between xmit
and xmit completion handler making the additional use of the xmit_lock
unnecessary.
Furthermore the driver does not set NETIF_F_LLTX resulting in xmit to be
called with the xmit_lock held and then taking the private lock while xmit
completion handler does the reverse, first take the private lock, then the
xmit_lock.
Fix these issues by not taking the xmit_lock in the tx completion handler.
Signed-off-by: default avatarLino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 151a14db
...@@ -463,7 +463,6 @@ static int tse_tx_complete(struct altera_tse_private *priv) ...@@ -463,7 +463,6 @@ static int tse_tx_complete(struct altera_tse_private *priv)
if (unlikely(netif_queue_stopped(priv->dev) && if (unlikely(netif_queue_stopped(priv->dev) &&
tse_tx_avail(priv) > TSE_TX_THRESH(priv))) { tse_tx_avail(priv) > TSE_TX_THRESH(priv))) {
netif_tx_lock(priv->dev);
if (netif_queue_stopped(priv->dev) && if (netif_queue_stopped(priv->dev) &&
tse_tx_avail(priv) > TSE_TX_THRESH(priv)) { tse_tx_avail(priv) > TSE_TX_THRESH(priv)) {
if (netif_msg_tx_done(priv)) if (netif_msg_tx_done(priv))
...@@ -471,7 +470,6 @@ static int tse_tx_complete(struct altera_tse_private *priv) ...@@ -471,7 +470,6 @@ static int tse_tx_complete(struct altera_tse_private *priv)
__func__); __func__);
netif_wake_queue(priv->dev); netif_wake_queue(priv->dev);
} }
netif_tx_unlock(priv->dev);
} }
spin_unlock(&priv->tx_lock); spin_unlock(&priv->tx_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment