diff options
Diffstat (limited to 'sound/pci/hda/hda_intel.c')
-rw-r--r-- | sound/pci/hda/hda_intel.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 9a20fb1bef4f..557f269f83ab 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -536,8 +536,9 @@ static void azx_update_rirb(struct azx *chip) | |||
536 | if (res_ex & ICH6_RIRB_EX_UNSOL_EV) | 536 | if (res_ex & ICH6_RIRB_EX_UNSOL_EV) |
537 | snd_hda_queue_unsol_event(chip->bus, res, res_ex); | 537 | snd_hda_queue_unsol_event(chip->bus, res, res_ex); |
538 | else if (chip->rirb.cmds) { | 538 | else if (chip->rirb.cmds) { |
539 | chip->rirb.cmds--; | ||
540 | chip->rirb.res = res; | 539 | chip->rirb.res = res; |
540 | smp_wmb(); | ||
541 | chip->rirb.cmds--; | ||
541 | } | 542 | } |
542 | } | 543 | } |
543 | } | 544 | } |
@@ -556,8 +557,10 @@ static unsigned int azx_rirb_get_response(struct hda_codec *codec) | |||
556 | azx_update_rirb(chip); | 557 | azx_update_rirb(chip); |
557 | spin_unlock_irq(&chip->reg_lock); | 558 | spin_unlock_irq(&chip->reg_lock); |
558 | } | 559 | } |
559 | if (!chip->rirb.cmds) | 560 | if (!chip->rirb.cmds) { |
561 | smp_rmb(); | ||
560 | return chip->rirb.res; /* the last value */ | 562 | return chip->rirb.res; /* the last value */ |
563 | } | ||
561 | if (time_after(jiffies, timeout)) | 564 | if (time_after(jiffies, timeout)) |
562 | break; | 565 | break; |
563 | if (codec->bus->needs_damn_long_delay) | 566 | if (codec->bus->needs_damn_long_delay) |