Skip to contentSkip to conversation

Fix e1000 driver disable interrupts bug for realtime-preempt-2.6.11-rc4-V0.7.39-02

PATCH In review Yang Yi 2 participants 2 messages Mar 1, 2005 – Mar 29, 2005

lore
Share & tools
lore

Yang Yi

author
#0 lore raw

PATCH 1/1 Fix e1000 driver disable interrupts bug for realtime-preempt-2.6.11-rc4-V0.7.39-02

Hi ,Ingo

this patch fixes e1000 driver disable interrupt bug when enabling "Complete Preemption (Realtime)".

Type: Defect Fix
Disposition: submitted to LKML

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;
        }
#1 lore raw
Quoted 4 lines · Yang Yi

Hi ,Ingo

this patch fixes e1000 driver disable interrupt bug when enabling "Complete Preemption (Realtime)".

thanks - applied it to the 41-12 tree.

Ingo