From patchwork Tue Nov 9 10:47:46 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 70527 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id F3676B712A for ; Tue, 9 Nov 2010 21:56:15 +1100 (EST) Received: from localhost ([127.0.0.1]:60577 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PFls5-00089U-9M for incoming@patchwork.ozlabs.org; Tue, 09 Nov 2010 05:56:13 -0500 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 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oA9Alu1l025673 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 9 Nov 2010 05:47:56 -0500 Received: from rincewind.home.kraxel.org (vpn1-5-23.ams2.redhat.com [10.36.5.23]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oA9Alo5d009432; Tue, 9 Nov 2010 05:47:55 -0500 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id E7F9A45821; Tue, 9 Nov 2010 11:47:49 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org 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 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id oA9Alu1l025673 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: =?UTF-8?q?Fran=C3=A7ois=20Revol?= , Gerd Hoffmann Subject: [Qemu-devel] [PATCH v2 3/6] intel-hda: Honor WAKEEN bits. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 ] = {