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

Commit 5845b677 authored by Ingo Molnar's avatar Ingo Molnar Committed by Jeff Garzik
Browse files

atl1: use spin_trylock_irqsave()



use the simpler spin_trylock_irqsave() API to get the adapter lock.

[ this is also a fix for -rt where adapter->lock is a sleeping lock. ]

Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarJay Cliburn <jacliburn@bellsouth.net>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 092ed997
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -1704,10 +1704,8 @@ static int atl1_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
		}
		}
	}
	}


	local_irq_save(flags);
	if (!spin_trylock_irqsave(&adapter->lock, flags)) {
	if (!spin_trylock(&adapter->lock)) {
		/* Can't get lock - tell upper layer to requeue */
		/* Can't get lock - tell upper layer to requeue */
		local_irq_restore(flags);
		dev_printk(KERN_DEBUG, &adapter->pdev->dev, "tx locked\n");
		dev_printk(KERN_DEBUG, &adapter->pdev->dev, "tx locked\n");
		return NETDEV_TX_LOCKED;
		return NETDEV_TX_LOCKED;
	}
	}