netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jay Cliburn <jacliburn@bellsouth.net>
To: jeff@garzik.org
Cc: mingo@elte.hu, csnook@redhat.com,
	atl1-devel@lists.sourceforge.net, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, nando@ccrma.Stanford.EDU,
	tglx@linutronix.de, brbrofsvl@gmail.com,
	Jay Cliburn <jacliburn@bellsouth.net>
Subject: [PATCH] atl1: use spin_trylock_irqsave()
Date: Tue, 31 Jul 2007 19:07:02 -0500	[thread overview]
Message-ID: <11859268222715-git-send-email-jacliburn@bellsouth.net> (raw)

From: Ingo Molnar <mingo@elte.hu>

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: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net>
---
 drivers/net/atl1/atl1_main.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/net/atl1/atl1_main.c b/drivers/net/atl1/atl1_main.c
index 56f6389..3c1984e 100644
--- a/drivers/net/atl1/atl1_main.c
+++ b/drivers/net/atl1/atl1_main.c
@@ -1704,10 +1704,8 @@ static int atl1_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
 		}
 	}
 
-	local_irq_save(flags);
-	if (!spin_trylock(&adapter->lock)) {
+	if (!spin_trylock_irqsave(&adapter->lock, flags)) {
 		/* Can't get lock - tell upper layer to requeue */
-		local_irq_restore(flags);
 		dev_printk(KERN_DEBUG, &adapter->pdev->dev, "tx locked\n");
 		return NETDEV_TX_LOCKED;
 	}
-- 
1.5.2.2


             reply	other threads:[~2007-08-01  0:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-01  0:07 Jay Cliburn [this message]
2007-08-07 21:18 ` [PATCH] atl1: use spin_trylock_irqsave() Jeff Garzik

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=11859268222715-git-send-email-jacliburn@bellsouth.net \
    --to=jacliburn@bellsouth.net \
    --cc=atl1-devel@lists.sourceforge.net \
    --cc=brbrofsvl@gmail.com \
    --cc=csnook@redhat.com \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=nando@ccrma.Stanford.EDU \
    --cc=netdev@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).