From: Roland Dreier <rolandd@cisco.com>
To: linux-kernel@vger.kernel.org, openib-general@openib.org
Subject: [git patch review 2/5] [IPoIB] use spin_trylock_irqsave()
Date: Mon, 31 Oct 2005 22:34:42 +0000 [thread overview]
Message-ID: <1130798082548-c351d7732f360685@cisco.com> (raw)
In-Reply-To: <1130798082548-646b24d6f405c5f5@cisco.com>
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>
---
drivers/infiniband/ulp/ipoib/ipoib_main.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
applies-to: e4e6a0f5f2203569b6ada4c101a146c3a4f24c28
a20583a7c2e35d80b1dfc1f60c9729498838725e
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index cd4f423..273d5f4 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_bu
struct ipoib_neigh *neigh;
unsigned long flags;
- local_irq_save(flags);
- if (!spin_trylock(&priv->tx_lock)) {
- local_irq_restore(flags);
+ if (!spin_trylock_irqsave(&priv->tx_lock, flags))
return NETDEV_TX_LOCKED;
- }
/*
* Check if our queue is stopped. Since we have the LLTX bit
---
0.99.9
next prev parent reply other threads:[~2005-10-31 22:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-31 22:34 [git patch review 1/5] [IB] mthca: report asynchronous CQ events Roland Dreier
2005-10-31 22:34 ` Roland Dreier [this message]
2005-10-31 22:34 ` [git patch review 3/5] [IB] uverbs: Avoid NULL pointer deref on CQ async event Roland Dreier
2005-10-31 22:34 ` [git patch review 4/5] [IB] mthca: Avoid SRQ free WQE list corruption Roland Dreier
2005-10-31 22:34 ` [git patch review 5/5] [IPoIB] cleanups: fix comment, remove useless variables Roland Dreier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1130798082548-c351d7732f360685@cisco.com \
--to=rolandd@cisco.com \
--cc=linux-kernel@vger.kernel.org \
--cc=openib-general@openib.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®