From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:53827) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rvpra-0003Bi-D1 for qemu-devel@nongnu.org; Fri, 10 Feb 2012 07:46:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RvprU-0007IP-K1 for qemu-devel@nongnu.org; Fri, 10 Feb 2012 07:46:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42518) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvprU-0007Hu-9l for qemu-devel@nongnu.org; Fri, 10 Feb 2012 07:46:00 -0500 From: Kevin Wolf Date: Fri, 10 Feb 2012 13:47:44 +0100 Message-Id: <1328878064-4907-16-git-send-email-kwolf@redhat.com> In-Reply-To: <1328878064-4907-1-git-send-email-kwolf@redhat.com> References: <1328878064-4907-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH 15/15] AHCI: Masking of IRQs actually masks them List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anthony@codemonkey.ws Cc: kwolf@redhat.com, qemu-devel@nongnu.org From: Alexander Graf When masking IRQ lines, we should actually mask them out and not declare them active anymore. Once we mask them in again, they are allowed to trigger again. Signed-off-by: Alexander Graf Signed-off-by: Kevin Wolf --- hw/ide/ahci.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index caff7bc..f7ef114 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -146,6 +146,7 @@ static void ahci_check_irq(AHCIState *s) DPRINTF(-1, "check irq %#x\n", s->control_regs.irqstatus); + s->control_regs.irqstatus = 0; for (i = 0; i < s->ports; i++) { AHCIPortRegs *pr = &s->dev[i].port_regs; if (pr->irq_stat & pr->irq_mask) { @@ -216,6 +217,7 @@ static void ahci_port_write(AHCIState *s, int port, int offset, uint32_t val) break; case PORT_IRQ_STAT: pr->irq_stat &= ~val; + ahci_check_irq(s); break; case PORT_IRQ_MASK: pr->irq_mask = val & 0xfdc000ff; -- 1.7.6.5