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