From patchwork Mon Nov 8 13:46:09 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [3/4] intel-hda: Honor WAKEEN bits. Date: Mon, 08 Nov 2010 03:46:09 -0000 From: Gerd Hoffmann X-Patchwork-Id: 70417 Message-Id: <1289223970-31221-4-git-send-email-kraxel@redhat.com> To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Fran=C3=A7ois=20Revol?= , Gerd Hoffmann From: François Revol HDA: Honor WAKEEN bits when deciding to raise an interrupt on codec status change. This prevents an interrupt storm with the Haiku HDA driver which does not handle codec status changes in the irq handler. Signed-off-by: François Revol Signed-off-by: Gerd Hoffmann --- hw/intel-hda.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/intel-hda.c b/hw/intel-hda.c index 78c32da..2c1ef12 100644 --- a/hw/intel-hda.c +++ b/hw/intel-hda.c @@ -246,7 +246,7 @@ static void intel_hda_update_int_sts(IntelHDAState *d) if (d->rirb_sts & ICH6_RBSTS_OVERRUN) { sts |= (1 << 30); } - if (d->state_sts) { + if (d->state_sts & d->wake_en) { sts |= (1 << 30); } @@ -628,6 +628,7 @@ static const struct IntelHDAReg regtab[] = { [ ICH6_REG_WAKEEN ] = { .name = "WAKEEN", .size = 2, + .wmask = 0x3fff, .offset = offsetof(IntelHDAState, wake_en), }, [ ICH6_REG_STATESTS ] = {