diff options
author | James Courtier-Dutton <James@superbug.co.uk> | 2007-11-10 17:55:14 +0000 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-01-31 17:30:24 +0100 |
commit | c94fa4c9168e51a8dab8e72cb9f0d89673fc8d8c (patch) | |
tree | 08169553a3b69a284b322941131f406661e499e8 /sound/pci/emu10k1/irq.c | |
parent | 3839e4f136d6da3dc85d237aa9569ee94bfea763 (diff) | |
download | kernel_goldelico_gta04-c94fa4c9168e51a8dab8e72cb9f0d89673fc8d8c.zip kernel_goldelico_gta04-c94fa4c9168e51a8dab8e72cb9f0d89673fc8d8c.tar.gz kernel_goldelico_gta04-c94fa4c9168e51a8dab8e72cb9f0d89673fc8d8c.tar.bz2 |
[ALSA] emu10k1: General cleanup, add new locks, fix alsa bug#3501, kernel bug#9304.
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
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 276d08c..30bfed6 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) struct snd_emu10k1 *emu = dev_id; unsigned int status, status2, orig_status, orig_status2; int handled = 0; + int timeout = 0; - while ((status = inl(emu->port + IPR)) != 0) { - //snd_printk(KERN_INFO "emu10k1 irq - status = 0x%x\n", status); + while (((status = inl(emu->port + IPR)) != 0) && (timeout < 1000)) { + timeout++; orig_status = status; handled = 1; if ((status & 0xffffffff) == 0xffffffff) { @@ -200,5 +201,8 @@ irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id) } outl(orig_status, emu->port + IPR); /* ack all */ } + if (timeout == 1000) + snd_printk(KERN_INFO "emu10k1 irq routine failure\n"); + return IRQ_RETVAL(handled); } |