Skip to content

Commit

Permalink
mv643xx: Clear pending interrupts before calling request_irq
Browse files Browse the repository at this point in the history
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Acked-by: Giridhar Pemmasani <pgiri@yahoo.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Dale Farnsworth authored and Jeff Garzik committed Mar 9, 2007
1 parent 276e26c commit 85cf572
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions drivers/net/mv643xx_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit 85cf572

Please sign in to comment.