diff options
-rw-r--r-- | sound/pci/hda/hda_intel.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 981b6fd1ae7..c5c97880f50 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -702,11 +702,13 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus, | |||
702 | { | 702 | { |
703 | struct azx *chip = bus->private_data; | 703 | struct azx *chip = bus->private_data; |
704 | unsigned long timeout; | 704 | unsigned long timeout; |
705 | unsigned long loopcounter; | ||
705 | int do_poll = 0; | 706 | int do_poll = 0; |
706 | 707 | ||
707 | again: | 708 | again: |
708 | timeout = jiffies + msecs_to_jiffies(1000); | 709 | timeout = jiffies + msecs_to_jiffies(1000); |
709 | for (;;) { | 710 | |
711 | for (loopcounter = 0;; loopcounter++) { | ||
710 | if (chip->polling_mode || do_poll) { | 712 | if (chip->polling_mode || do_poll) { |
711 | spin_lock_irq(&chip->reg_lock); | 713 | spin_lock_irq(&chip->reg_lock); |
712 | azx_update_rirb(chip); | 714 | azx_update_rirb(chip); |
@@ -722,7 +724,7 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus, | |||
722 | } | 724 | } |
723 | if (time_after(jiffies, timeout)) | 725 | if (time_after(jiffies, timeout)) |
724 | break; | 726 | break; |
725 | if (bus->needs_damn_long_delay) | 727 | if (bus->needs_damn_long_delay || loopcounter > 3000) |
726 | msleep(2); /* temporary workaround */ | 728 | msleep(2); /* temporary workaround */ |
727 | else { | 729 | else { |
728 | udelay(10); | 730 | udelay(10); |