aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2005-10-29 16:54:40 -0400
committerRoland Dreier <rolandd@cisco.com>2005-10-29 16:54:40 -0400
commita20583a7c2e35d80b1dfc1f60c9729498838725e (patch)
treee7fbd856e7522b65d309e9dfd425541d8f45a0bd /drivers/infiniband/ulp
parentaffcd50546d4788b7849e2b2e2ec7bc50d64c5f8 (diff)
[IPoIB] use spin_trylock_irqsave()
Use spin_trylock_irqsave() in ipoib_start_xmit() instead of reinventing it out of local_irq_save(), spin_trylock() and local_irq_restore(). Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/ulp')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_main.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index cd4f42328dbe..273d5f418a67 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -551,11 +551,8 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev)
551 struct ipoib_neigh *neigh; 551 struct ipoib_neigh *neigh;
552 unsigned long flags; 552 unsigned long flags;
553 553
554 local_irq_save(flags); 554 if (!spin_trylock_irqsave(&priv->tx_lock, flags))
555 if (!spin_trylock(&priv->tx_lock)) {
556 local_irq_restore(flags);
557 return NETDEV_TX_LOCKED; 555 return NETDEV_TX_LOCKED;
558 }
559 556
560 /* 557 /*
561 * Check if our queue is stopped. Since we have the LLTX bit 558 * Check if our queue is stopped. Since we have the LLTX bit