From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=53829 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PFlk7-0005HF-VN for qemu-devel@nongnu.org; Tue, 09 Nov 2010 05:48:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PFlk6-0002pQ-Rw for qemu-devel@nongnu.org; Tue, 09 Nov 2010 05:47:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40093) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PFlk6-0002p8-Kv for qemu-devel@nongnu.org; Tue, 09 Nov 2010 05:47:58 -0500 From: Gerd Hoffmann Date: Tue, 9 Nov 2010 11:47:46 +0100 Message-Id: <1289299669-5504-4-git-send-email-kraxel@redhat.com> In-Reply-To: <1289299669-5504-1-git-send-email-kraxel@redhat.com> References: <1289299669-5504-1-git-send-email-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v2 3/6] intel-hda: Honor WAKEEN bits. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Fran=C3=A7ois=20Revol?= , Gerd Hoffmann From: Fran=C3=A7ois 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=C3=A7ois 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 |=3D (1 << 30); } - if (d->state_sts) { + if (d->state_sts & d->wake_en) { sts |=3D (1 << 30); } =20 @@ -628,6 +628,7 @@ static const struct IntelHDAReg regtab[] =3D { [ ICH6_REG_WAKEEN ] =3D { .name =3D "WAKEEN", .size =3D 2, + .wmask =3D 0x3fff, .offset =3D offsetof(IntelHDAState, wake_en), }, [ ICH6_REG_STATESTS ] =3D { --=20 1.7.1