From: Yang Yi <yyang@ch.mvista.com>
To: mingo@elte.hu
Cc: linux-kernel@vger.kernel.org, Rt-Dev@Mvista.Com
Subject: [patch] Fix e1000 driver disable interrupts bug for realtime-preempt-2.6.11-rc4-V0.7.39-02
Date: Tue, 01 Mar 2005 15:52:10 +0800 [thread overview]
Message-ID: <1109663530.18759.207.camel@montavista2> (raw)
Hi ,Ingo
this patch fixes e1000 driver disable interrupt bug when enabling
"Complete Preemption (Realtime)".
Type: Defect Fix
Disposition: submitted to LKML
Signed-off-by: Yi Yang <yyang@ch.mvista.com>
Description: When enabling Complete Real-time Preemption, e1000 driver
always disables interrupts while calling e1000_xmit_frame, this will
lead to some serious problem, for example, the time will be skewed
because timer interrupt is also disabled, it also leads to network
packet missed, netperf's result indicates that thing is very very bad.
As a matter of fact, the reason is that
spin_unlock_irqrestore(&adapter->tx_lock) won't restore flags under the
Complete Preemption (Realtime) case, according to Real-time Preemption
regular, spin_lock_irqsave(&adapter->tx_lock) also dosen't disable
interrupts, so, local_irq_save and local_irq_restore should be changed
into local_irq_save_nort and local_irq_restore_nort, respectively.
--- a/drivers/net/e1000/e1000_main.c 2005-03-01 11:04:53.000000000
+0800
+++ b/drivers/net/e1000/e1000_main.c 2005-03-01 13:46:40.000000000
+0800
@@ -1802,10 +1802,10 @@ e1000_xmit_frame(struct sk_buff *skb, st
if(adapter->pcix_82544)
count += nr_frags;
- local_irq_save(flags);
+ local_irq_save_nort(flags);
if (!spin_trylock(&adapter->tx_lock)) {
/* Collision - tell upper layer to requeue */
- local_irq_restore(flags);
+ local_irq_restore_nort(flags);
return NETDEV_TX_LOCKED;
}
next reply other threads:[~2005-03-01 7:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-01 7:52 Yang Yi [this message]
2005-03-29 8:33 ` Ingo Molnar
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=1109663530.18759.207.camel@montavista2 \
--to=yyang@ch.mvista.com \
--cc=Rt-Dev@Mvista.Com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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®