Message ID | 20161124104619.GA30723@amd |
---|---|
State | RFC, archived |
Delegated to: | David Miller |
Headers | show |
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 0363db3..1cff258 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -2185,12 +2185,12 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev) spin_lock(&priv->tx_lock); if (unlikely(stmmac_tx_avail(priv) < nfrags + 1)) { - spin_unlock(&priv->tx_lock); if (!netif_queue_stopped(dev)) { netif_stop_queue(dev); /* This is a hard error, log it. */ pr_err("%s: Tx Ring full when queue awake\n", __func__); } + spin_unlock(&priv->tx_lock); return NETDEV_TX_BUSY; }
Make locking match in both _xmit functions. Signed-off-by: Pavel Machek <pavel@denx.de>