summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2012-01-30 23:29:48 +0100
committerKevin Wolf <kwolf@redhat.com>2012-02-09 16:17:51 +0100
commitb867672884afc39b6537a8aa6aa2f20a5154bf4f (patch)
tree89549c55f3f0c9ee267369dea23a96879f48d5f1
parent6d1acda8f16d1f2d0b05cfbf9ce54d05849cb016 (diff)
downloadqemu-b867672884afc39b6537a8aa6aa2f20a5154bf4f.tar.gz
qemu-b867672884afc39b6537a8aa6aa2f20a5154bf4f.tar.bz2
qemu-b867672884afc39b6537a8aa6aa2f20a5154bf4f.zip
AHCI: Masking of IRQs actually masks them
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 <agraf@suse.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r--hw/ide/ahci.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index caff7bc9e6..f7ef114123 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;