From: "Michael Chan" <mchan@broadcom.com>
To: davem@davemloft.net
Cc: herbert@gondor.apana.org.au, jgarzik@pobox.com, netdev@vger.kernel.org
Subject: [PATCH 2.6.18 1/3] tg3: Remove unnecessary tx_lock
Date: Mon, 05 Jun 2006 12:47:23 -0700 [thread overview]
Message-ID: <1149536843.13155.6.camel@rh4> (raw)
Remove tx_lock where it is unnecessary. tg3 runs lockless and so it
requires interrupts to be disabled and sync'ed, netif_queue and NAPI
poll to be stopped before the device can be reconfigured. After
stopping everything, it is no longer necessary to get the tx_lock.
Signed-off-by: Michael Chan <mchan@broadcom.com>
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index f2382aa..4cda2af 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -2984,9 +2984,7 @@ static void tg3_tx_recover(struct tg3 *t
"and include system chipset information.\n", tp->dev->name);
spin_lock(&tp->lock);
- spin_lock(&tp->tx_lock);
tp->tg3_flags |= TG3_FLAG_TX_RECOVERY_PENDING;
- spin_unlock(&tp->tx_lock);
spin_unlock(&tp->lock);
}
@@ -3429,12 +3427,10 @@ static inline void tg3_full_lock(struct
if (irq_sync)
tg3_irq_quiesce(tp);
spin_lock_bh(&tp->lock);
- spin_lock(&tp->tx_lock);
}
static inline void tg3_full_unlock(struct tg3 *tp)
{
- spin_unlock(&tp->tx_lock);
spin_unlock_bh(&tp->lock);
}
next reply other threads:[~2006-06-05 21:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-05 19:47 Michael Chan [this message]
2006-06-06 2:04 ` [PATCH 2.6.18 1/3] tg3: Remove unnecessary tx_lock Herbert Xu
2006-06-18 4:57 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2006-06-06 5:10 Michael Chan
2006-06-06 10:17 ` Herbert Xu
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=1149536843.13155.6.camel@rh4 \
--to=mchan@broadcom.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=jgarzik@pobox.com \
--cc=netdev@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.