Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b8883a65 authored by Jiri Slaby's avatar Jiri Slaby Committed by David S. Miller
Browse files

NET: sungem, use spin_trylock_irqsave



Use spin_trylock_irqsave instead of open-coded
local_irq_save+spin_trylock.

Signed-off-by: default avatarJiri Slaby <jirislaby@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c6d14c84
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -1033,10 +1033,8 @@ static netdev_tx_t gem_start_xmit(struct sk_buff *skb,
			(csum_stuff_off << 21));
	}

	local_irq_save(flags);
	if (!spin_trylock(&gp->tx_lock)) {
	if (!spin_trylock_irqsave(&gp->tx_lock, flags)) {
		/* Tell upper layer to requeue */
		local_irq_restore(flags);
		return NETDEV_TX_LOCKED;
	}
	/* We raced with gem_do_stop() */