From b90c3a23d85c06dc90e0e4439b39af269960cf51 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 18 Mar 2008 09:47:06 +0100 Subject: [PATCH] --- yaml --- r: 92145 b: refs/heads/master c: 2add9b925394746eff692ff0875d21ea2d5289e2 h: refs/heads/master i: 92143: a2c0494ca2dabc0f0a247798ecbc2ead79fee93f v: v3 --- [refs] | 2 +- trunk/sound/pci/hda/hda_intel.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 0882aa46f23e..7d03818f56f4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 86d34b7ec878ea4b4c9f33ce92f1722c4326dbe7 +refs/heads/master: 2add9b925394746eff692ff0875d21ea2d5289e2 diff --git a/trunk/sound/pci/hda/hda_intel.c b/trunk/sound/pci/hda/hda_intel.c index 9a20fb1bef4f..557f269f83ab 100644 --- a/trunk/sound/pci/hda/hda_intel.c +++ b/trunk/sound/pci/hda/hda_intel.c @@ -536,8 +536,9 @@ static void azx_update_rirb(struct azx *chip) if (res_ex & ICH6_RIRB_EX_UNSOL_EV) snd_hda_queue_unsol_event(chip->bus, res, res_ex); else if (chip->rirb.cmds) { - chip->rirb.cmds--; chip->rirb.res = res; + smp_wmb(); + chip->rirb.cmds--; } } } @@ -556,8 +557,10 @@ static unsigned int azx_rirb_get_response(struct hda_codec *codec) azx_update_rirb(chip); spin_unlock_irq(&chip->reg_lock); } - if (!chip->rirb.cmds) + if (!chip->rirb.cmds) { + smp_rmb(); return chip->rirb.res; /* the last value */ + } if (time_after(jiffies, timeout)) break; if (codec->bus->needs_damn_long_delay)