intel-hda: Honor WAKEEN bits.
authorFrançois Revol <revol@free.fr>
Tue, 9 Nov 2010 10:47:46 +0000 (11:47 +0100)
committermalc <av1474@comtv.ru>
Tue, 9 Nov 2010 13:51:12 +0000 (16:51 +0300)
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 <revol@free.fr>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: malc <av1474@comtv.ru>
hw/intel-hda.c

index 78c32da47386790779a7e0db3959a5a39124b66b..2c1ef12491c65da9d304c4e14f3ee5cb1b3448be 100644 (file)
@@ -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 ] = {