From patchwork Sun Nov 7 15:12:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Fran=C3=A7ois_Revol?= X-Patchwork-Id: 70350 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 C6074B70F7 for ; Mon, 8 Nov 2010 02:13:44 +1100 (EST) Received: from localhost ([127.0.0.1]:60455 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PF6vz-0006sS-2f for incoming@patchwork.ozlabs.org; Sun, 07 Nov 2010 10:13:31 -0500 Received: from [140.186.70.92] (port=41823 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PF6ur-0006MM-5d for qemu-devel@nongnu.org; Sun, 07 Nov 2010 10:12:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PF6uo-0007AG-UN for qemu-devel@nongnu.org; Sun, 07 Nov 2010 10:12:20 -0500 Received: from smtp6-g21.free.fr ([212.27.42.6]:36078) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PF6uo-00079p-BB for qemu-devel@nongnu.org; Sun, 07 Nov 2010 10:12:18 -0500 Received: from [192.168.0.1] (unknown [82.244.111.82]) by smtp6-g21.free.fr (Postfix) with ESMTP id E53D982284 for ; Sun, 7 Nov 2010 16:12:11 +0100 (CET) From: =?iso-8859-1?Q?Fran=E7ois_Revol?= Date: Sun, 7 Nov 2010 16:12:10 +0100 Message-Id: To: qemu-devel@nongnu.org Mime-Version: 1.0 (Apple Message framework v1081) X-Mailer: Apple Mail (2.1081) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: [Qemu-devel] [PATCH] HDA: Honor WAKEEN bits when deciding to raise an interrupt on codec status 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 2e6c61248c76d3f0c511658b9f34660d034703a4 Mon Sep 17 00:00:00 2001 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 --- 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 ccb059d..f1bd203 100644 --- a/hw/intel-hda.c +++ b/hw/intel-hda.c @@ -235,7 +235,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); } @@ -617,6 +617,7 @@ static const struct IntelHDAReg regtab[] = { [ ICH6_REG_WAKEEN ] = { .name = "WAKEEN", .size = 2, + .wmask = 0x3fff, .offset = offsetof(IntelHDAState, wake_en), }, [ ICH6_REG_STATESTS ] = {