diff options
Diffstat (limited to 'sound/pci/emu10k1/irq.c')
-rw-r--r-- | sound/pci/emu10k1/irq.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/pci/emu10k1/irq.c b/sound/pci/emu10k1/irq.c index 276d08c88f91..30bfed6f8339 100644 --- a/sound/pci/emu10k1/irq.c +++ b/sound/pci/emu10k1/irq.c | |||
@@ -34,9 +34,10 @@ irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id) | |||
34 | struct snd_emu10k1 *emu = dev_id; | 34 | struct snd_emu10k1 *emu = dev_id; |
35 | unsigned int status, status2, orig_status, orig_status2; | 35 | unsigned int status, status2, orig_status, orig_status2; |
36 | int handled = 0; | 36 | int handled = 0; |
37 | int timeout = 0; | ||
37 | 38 | ||
38 | while ((status = inl(emu->port + IPR)) != 0) { | 39 | while (((status = inl(emu->port + IPR)) != 0) && (timeout < 1000)) { |
39 | //snd_printk(KERN_INFO "emu10k1 irq - status = 0x%x\n", status); | 40 | timeout++; |
40 | orig_status = status; | 41 | orig_status = status; |
41 | handled = 1; | 42 | handled = 1; |
42 | if ((status & 0xffffffff) == 0xffffffff) { | 43 | if ((status & 0xffffffff) == 0xffffffff) { |
@@ -200,5 +201,8 @@ irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id) | |||
200 | } | 201 | } |
201 | outl(orig_status, emu->port + IPR); /* ack all */ | 202 | outl(orig_status, emu->port + IPR); /* ack all */ |
202 | } | 203 | } |
204 | if (timeout == 1000) | ||
205 | snd_printk(KERN_INFO "emu10k1 irq routine failure\n"); | ||
206 | |||
203 | return IRQ_RETVAL(handled); | 207 | return IRQ_RETVAL(handled); |
204 | } | 208 | } |