summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorDale Farnsworth <dale@farnsworth.org>2007-03-08 05:21:23 (GMT)
committerJeff Garzik <jeff@garzik.org>2007-03-09 16:51:32 (GMT)
commit85cf572cd5a1b63d5efd5bd538201bd56cd5ad24 (patch)
tree56953963ca8fac9b10e985ca94e2355ce823e8eb /drivers/net
parent276e26c3160602efea1d0acc9fe7b45bb4c2c8e1 (diff)
downloadlinux-85cf572cd5a1b63d5efd5bd538201bd56cd5ad24.tar.xz
mv643xx: Clear pending interrupts before calling request_irq
Signed-off-by: Dale Farnsworth <dale@farnsworth.org> Acked-by: Giridhar Pemmasani <pgiri@yahoo.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/mv643xx_eth.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index 9ba21e0..1ee27c3 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -787,6 +787,12 @@ static int mv643xx_eth_open(struct net_device *dev)
unsigned int size;
int err;
+ /* Clear any pending ethernet port interrupts */
+ mv_write(MV643XX_ETH_INTERRUPT_CAUSE_REG(port_num), 0);
+ mv_write(MV643XX_ETH_INTERRUPT_CAUSE_EXTEND_REG(port_num), 0);
+ /* wait for previous write to complete */
+ mv_read (MV643XX_ETH_INTERRUPT_CAUSE_EXTEND_REG(port_num));
+
err = request_irq(dev->irq, mv643xx_eth_int_handler,
IRQF_SHARED | IRQF_SAMPLE_RANDOM, dev->name, dev);
if (err) {
@@ -875,10 +881,6 @@ static int mv643xx_eth_open(struct net_device *dev)
mv643xx_eth_rx_refill_descs(dev); /* Fill RX ring with skb's */
- /* Clear any pending ethernet port interrupts */
- mv_write(MV643XX_ETH_INTERRUPT_CAUSE_REG(port_num), 0);
- mv_write(MV643XX_ETH_INTERRUPT_CAUSE_EXTEND_REG(port_num), 0);
-
eth_port_start(dev);
/* Interrupt Coalescing */