aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/pci/hda/hda_intel.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index fe07bdff60d0..be5cbbcb6ec3 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -551,7 +551,7 @@ static unsigned int azx_rirb_get_response(struct hda_codec *codec)
551 551
552 again: 552 again:
553 timeout = jiffies + msecs_to_jiffies(1000); 553 timeout = jiffies + msecs_to_jiffies(1000);
554 do { 554 for (;;) {
555 if (chip->polling_mode) { 555 if (chip->polling_mode) {
556 spin_lock_irq(&chip->reg_lock); 556 spin_lock_irq(&chip->reg_lock);
557 azx_update_rirb(chip); 557 azx_update_rirb(chip);
@@ -559,13 +559,15 @@ static unsigned int azx_rirb_get_response(struct hda_codec *codec)
559 } 559 }
560 if (!chip->rirb.cmds) 560 if (!chip->rirb.cmds)
561 return chip->rirb.res; /* the last value */ 561 return chip->rirb.res; /* the last value */
562 if (time_after(jiffies, timeout))
563 break;
562 if (codec->bus->needs_damn_long_delay) 564 if (codec->bus->needs_damn_long_delay)
563 msleep(2); /* temporary workaround */ 565 msleep(2); /* temporary workaround */
564 else { 566 else {
565 udelay(10); 567 udelay(10);
566 cond_resched(); 568 cond_resched();
567 } 569 }
568 } while (time_after_eq(timeout, jiffies)); 570 }
569 571
570 if (chip->msi) { 572 if (chip->msi) {
571 snd_printk(KERN_WARNING "hda_intel: No response from codec, " 573 snd_printk(KERN_WARNING "hda_intel: No response from codec, "