aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_intel.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-04-21 05:11:54 -0400
committerTakashi Iwai <tiwai@suse.de>2009-04-21 05:11:54 -0400
commitb97bedcdedb4ae95b2128a4770dfc160e113b174 (patch)
treec604636b8991e0e53a20e0dbe666a57afe72ea45 /sound/pci/hda/hda_intel.c
parent858940773ad5f9dfe32ddb34fa1c90638c5a39df (diff)
parent586be3fcf97eec22fbc0ef6d67e823706aea7167 (diff)
Merge branch 'topic/hda-cache' into topic/hda
Diffstat (limited to 'sound/pci/hda/hda_intel.c')
-rw-r--r--sound/pci/hda/hda_intel.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 41db5d4da478..04f19f8cad84 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -606,6 +606,7 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus)
606 } 606 }
607 if (!chip->rirb.cmds) { 607 if (!chip->rirb.cmds) {
608 smp_rmb(); 608 smp_rmb();
609 bus->rirb_error = 0;
609 return chip->rirb.res; /* the last value */ 610 return chip->rirb.res; /* the last value */
610 } 611 }
611 if (time_after(jiffies, timeout)) 612 if (time_after(jiffies, timeout))
@@ -625,8 +626,10 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus)
625 chip->irq = -1; 626 chip->irq = -1;
626 pci_disable_msi(chip->pci); 627 pci_disable_msi(chip->pci);
627 chip->msi = 0; 628 chip->msi = 0;
628 if (azx_acquire_irq(chip, 1) < 0) 629 if (azx_acquire_irq(chip, 1) < 0) {
630 bus->rirb_error = 1;
629 return -1; 631 return -1;
632 }
630 goto again; 633 goto again;
631 } 634 }
632 635
@@ -646,14 +649,12 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus)
646 return -1; 649 return -1;
647 } 650 }
648 651
649 snd_printk(KERN_ERR "hda_intel: azx_get_response timeout, " 652 snd_printk(KERN_ERR "hda_intel: azx_get_response timeout (ERROR): "
650 "switching to single_cmd mode: last cmd=0x%08x\n", 653 "last cmd=0x%08x\n", chip->last_cmd);
651 chip->last_cmd); 654 spin_lock_irq(&chip->reg_lock);
652 chip->rirb.rp = azx_readb(chip, RIRBWP); 655 chip->rirb.cmds = 0; /* reset the index */
653 chip->rirb.cmds = 0; 656 bus->rirb_error = 1;
654 /* switch to single_cmd mode */ 657 spin_unlock_irq(&chip->reg_lock);
655 chip->single_cmd = 1;
656 azx_free_cmd_io(chip);
657 return -1; 658 return -1;
658} 659}
659 660