diff options
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"); | |||
| 155 | #define MEMORY_WAIT_TIME 16 | 155 | #define MEMORY_WAIT_TIME 16 |
| 156 | 156 | ||
| 157 | /* | 157 | /* |
| 158 | * The maximum number of processing loops allowed for each call to the | ||
| 159 | * IRQ handler. | ||
| 160 | */ | ||
| 161 | #define MAX_IRQ_LOOPS 8 | ||
| 162 | |||
| 163 | /* | ||
| 158 | * This selects whether TX packets are sent one by one to the SMC91x internal | 164 | * This selects whether TX packets are sent one by one to the SMC91x internal |
| 159 | * memory and throttled until transmission completes. This may prevent | 165 | * memory and throttled until transmission completes. This may prevent |
| 160 | * RX overruns a litle by keeping much of the memory free for RX packets | 166 | * 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) | |||
| 684 | 690 | ||
| 685 | /* queue the packet for TX */ | 691 | /* queue the packet for TX */ |
| 686 | SMC_SET_MMU_CMD(MC_ENQUEUE); | 692 | SMC_SET_MMU_CMD(MC_ENQUEUE); |
| 687 | SMC_ACK_INT(IM_TX_EMPTY_INT); | ||
| 688 | smc_special_unlock(&lp->lock); | 693 | smc_special_unlock(&lp->lock); |
| 689 | 694 | ||
| 690 | dev->trans_start = jiffies; | 695 | dev->trans_start = jiffies; |
| @@ -1207,6 +1212,7 @@ static void smc_phy_configure(void *data) | |||
| 1207 | smc_phy_check_media(dev, 1); | 1212 | smc_phy_check_media(dev, 1); |
| 1208 | 1213 | ||
| 1209 | smc_phy_configure_exit: | 1214 | smc_phy_configure_exit: |
| 1215 | SMC_SELECT_BANK(2); | ||
| 1210 | spin_unlock_irq(&lp->lock); | 1216 | spin_unlock_irq(&lp->lock); |
| 1211 | lp->work_pending = 0; | 1217 | lp->work_pending = 0; |
| 1212 | } | 1218 | } |
| @@ -1305,7 +1311,7 @@ static irqreturn_t smc_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
| 1305 | SMC_SET_INT_MASK(0); | 1311 | SMC_SET_INT_MASK(0); |
| 1306 | 1312 | ||
| 1307 | /* set a timeout value, so I don't stay here forever */ | 1313 | /* set a timeout value, so I don't stay here forever */ |
| 1308 | timeout = 8; | 1314 | timeout = MAX_IRQ_LOOPS; |
| 1309 | 1315 | ||
| 1310 | do { | 1316 | do { |
| 1311 | status = SMC_GET_INT(); | 1317 | status = SMC_GET_INT(); |
| @@ -1372,10 +1378,13 @@ static irqreturn_t smc_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
| 1372 | /* restore register states */ | 1378 | /* restore register states */ |
| 1373 | SMC_SET_PTR(saved_pointer); | 1379 | SMC_SET_PTR(saved_pointer); |
| 1374 | SMC_SET_INT_MASK(mask); | 1380 | SMC_SET_INT_MASK(mask); |
| 1375 | |||
| 1376 | spin_unlock(&lp->lock); | 1381 | spin_unlock(&lp->lock); |
| 1377 | 1382 | ||
| 1378 | DBG(3, "%s: Interrupt done (%d loops)\n", dev->name, 8-timeout); | 1383 | if (timeout == MAX_IRQ_LOOPS) |
| 1384 | PRINTK("%s: spurious interrupt (mask = 0x%02x)\n", | ||
| 1385 | dev->name, mask); | ||
| 1386 | DBG(3, "%s: Interrupt done (%d loops)\n", | ||
| 1387 | dev->name, MAX_IRQ_LOOPS - timeout); | ||
| 1379 | 1388 | ||
| 1380 | /* | 1389 | /* |
| 1381 | * We return IRQ_HANDLED unconditionally here even if there was | 1390 | * We return IRQ_HANDLED unconditionally here even if there was |
