Commit 50088f4b authored by Ingo Molnar's avatar Ingo Molnar Committed by Thomas Gleixner

drivers/net: trylock cleanup sungem

Use spin_trylock_irqsave() instead of open coding.
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 78af08d9
...@@ -1032,10 +1032,8 @@ static int gem_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -1032,10 +1032,8 @@ static int gem_start_xmit(struct sk_buff *skb, struct net_device *dev)
(csum_stuff_off << 21)); (csum_stuff_off << 21));
} }
local_irq_save(flags); if (!spin_trylock_irqsave(&gp->tx_lock, flags)) {
if (!spin_trylock(&gp->tx_lock)) {
/* Tell upper layer to requeue */ /* Tell upper layer to requeue */
local_irq_restore(flags);
return NETDEV_TX_LOCKED; return NETDEV_TX_LOCKED;
} }
/* We raced with gem_do_stop() */ /* We raced with gem_do_stop() */
......
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