aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_intel.c
diff options
context:
space:
mode:
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 30829ee920c3..803b72098ed3 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -604,6 +604,7 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus)
604 } 604 }
605 if (!chip->rirb.cmds) { 605 if (!chip->rirb.cmds) {
606 smp_rmb(); 606 smp_rmb();
607 bus->rirb_error = 0;
607 return chip->rirb.res; /* the last value */ 608 return chip->rirb.res; /* the last value */
608 } 609 }
609 if (time_after(jiffies, timeout)) 610 if (time_after(jiffies, timeout))
@@ -623,8 +624,10 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus)
623 chip->irq = -1; 624 chip->irq = -1;
624 pci_disable_msi(chip->pci); 625 pci_disable_msi(chip->pci);
625 chip->msi = 0; 626 chip->msi = 0;
626 if (azx_acquire_irq(chip, 1) < 0) 627 if (azx_acquire_irq(chip, 1) < 0) {
628 bus->rirb_error = 1;
627 return -1; 629 return -1;
630 }
628 goto again; 631 goto again;
629 } 632 }
630 633
@@ -644,14 +647,12 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus)
644 return -1; 647 return -1;
645 } 648 }
646 649
647 snd_printk(KERN_ERR "hda_intel: azx_get_response timeout, " 650 snd_printk(KERN_ERR "hda_intel: azx_get_response timeout (ERROR): "
648 "switching to single_cmd mode: last cmd=0x%08x\n", 651 "last cmd=0x%08x\n", chip->last_cmd);
649 chip->last_cmd); 652 spin_lock_irq(&chip->reg_lock);
650 chip->rirb.rp = azx_readb(chip, RIRBWP); 653 chip->rirb.cmds = 0; /* reset the index */
651 chip->rirb.cmds = 0; 654 bus->rirb_error = 1;
652 /* switch to single_cmd mode */ 655 spin_unlock_irq(&chip->reg_lock);
653 chip->single_cmd = 1;
654 azx_free_cmd_io(chip);
655 return -1; 656 return -1;
656} 657}
657 658