diff options
author | Kyle McMartin <kyle@parisc-linux.org> | 2005-11-18 16:39:20 -0500 |
---|---|---|
committer | Kyle McMartin <kyle@parisc-linux.org> | 2005-11-18 16:39:20 -0500 |
commit | 2161558fa5bebfeb272493ae91e836b497029023 (patch) | |
tree | 16304f91757243626d74e65063ee7224cacbf797 /drivers/net/smc91x.c | |
parent | e670dfb9a4f9e136da44db167da75b2365f7cebb (diff) | |
parent | e67b23c71cb9ee02d65a74c3858716ba2dedd554 (diff) | |
download | blackbird-op-linux-2161558fa5bebfeb272493ae91e836b497029023.tar.gz blackbird-op-linux-2161558fa5bebfeb272493ae91e836b497029023.zip |
Merge branch 'master'
Diffstat (limited to 'drivers/net/smc91x.c')
-rw-r--r-- | drivers/net/smc91x.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c index c91e2e81f131..28bf2e69eb5e 100644 --- a/drivers/net/smc91x.c +++ b/drivers/net/smc91x.c @@ -155,6 +155,12 @@ MODULE_LICENSE("GPL"); #define MEMORY_WAIT_TIME 16 /* + * The maximum number of processing loops allowed for each call to the + * IRQ handler. + */ +#define MAX_IRQ_LOOPS 8 + +/* * This selects whether TX packets are sent one by one to the SMC91x internal * memory and throttled until transmission completes. This may prevent * RX overruns a litle by keeping much of the memory free for RX packets @@ -684,7 +690,6 @@ static void smc_hardware_send_pkt(unsigned long data) /* queue the packet for TX */ SMC_SET_MMU_CMD(MC_ENQUEUE); - SMC_ACK_INT(IM_TX_EMPTY_INT); smc_special_unlock(&lp->lock); dev->trans_start = jiffies; @@ -1207,6 +1212,7 @@ static void smc_phy_configure(void *data) smc_phy_check_media(dev, 1); smc_phy_configure_exit: + SMC_SELECT_BANK(2); spin_unlock_irq(&lp->lock); lp->work_pending = 0; } @@ -1305,7 +1311,7 @@ static irqreturn_t smc_interrupt(int irq, void *dev_id, struct pt_regs *regs) SMC_SET_INT_MASK(0); /* set a timeout value, so I don't stay here forever */ - timeout = 8; + timeout = MAX_IRQ_LOOPS; do { status = SMC_GET_INT(); @@ -1372,10 +1378,13 @@ static irqreturn_t smc_interrupt(int irq, void *dev_id, struct pt_regs *regs) /* restore register states */ SMC_SET_PTR(saved_pointer); SMC_SET_INT_MASK(mask); - spin_unlock(&lp->lock); - DBG(3, "%s: Interrupt done (%d loops)\n", dev->name, 8-timeout); + if (timeout == MAX_IRQ_LOOPS) + PRINTK("%s: spurious interrupt (mask = 0x%02x)\n", + dev->name, mask); + DBG(3, "%s: Interrupt done (%d loops)\n", + dev->name, MAX_IRQ_LOOPS - timeout); /* * We return IRQ_HANDLED unconditionally here even if there was |