[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100503194316.60c98272.ken_kawasaki@spring.nifty.jp>
Date: Mon, 3 May 2010 19:43:16 +0900
From: Ken Kawasaki <ken_kawasaki@...ing.nifty.jp>
To: netdev@...r.kernel.org
Subject: [PATCH kernel 2.6.34-rc5] lib8390: to be SMP safe
lib8390:
write the value "ENISR_ALL" to register "EN0_IMR"
after enable_irq_lockdep_irqrestore.
This patch avoids frequent transmit error on SMP system.
Signed-off-by: Ken Kawasaki <ken_kawasaki@...ing.nifty.jp>
---
--- linux-2.6.34-rc6/drivers/net/lib8390.c.orig 2010-05-02 16:49:57.000000000 +0900
+++ linux-2.6.34-rc6/drivers/net/lib8390.c 2010-05-02 18:09:18.000000000 +0900
@@ -367,9 +367,9 @@ static netdev_tx_t __ei_start_xmit(struc
dev->name, ei_local->tx1, ei_local->tx2, ei_local->lasttx);
ei_local->irqlock = 0;
netif_stop_queue(dev);
- ei_outb_p(ENISR_ALL, e8390_base + EN0_IMR);
spin_unlock(&ei_local->page_lock);
enable_irq_lockdep_irqrestore(dev->irq, &flags);
+ ei_outb_p(ENISR_ALL, e8390_base + EN0_IMR);
dev->stats.tx_errors++;
return NETDEV_TX_BUSY;
}
@@ -407,10 +407,10 @@ static netdev_tx_t __ei_start_xmit(struc
/* Turn 8390 interrupts back on. */
ei_local->irqlock = 0;
- ei_outb_p(ENISR_ALL, e8390_base + EN0_IMR);
spin_unlock(&ei_local->page_lock);
enable_irq_lockdep_irqrestore(dev->irq, &flags);
+ ei_outb_p(ENISR_ALL, e8390_base + EN0_IMR);
dev_kfree_skb (skb);
dev->stats.tx_bytes += send_length;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists