diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2012-02-15 17:18:04 -0600 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-02-15 17:18:04 -0600 |
commit | 65b31cc207b8ab949033870acf55bb124d12848e (patch) | |
tree | c7727e413b24d8ae024fea2ab455f8c49be02b20 /hw/ide | |
parent | b2d4b3f7b8c8ad0519c4705a3b850446068e6946 (diff) | |
parent | b867672884afc39b6537a8aa6aa2f20a5154bf4f (diff) | |
download | qemu-65b31cc207b8ab949033870acf55bb124d12848e.zip qemu-65b31cc207b8ab949033870acf55bb124d12848e.tar.gz qemu-65b31cc207b8ab949033870acf55bb124d12848e.tar.bz2 |
Merge remote-tracking branch 'kwolf/for-anthony' into staging
* kwolf/for-anthony:
AHCI: Masking of IRQs actually masks them
sheepdog: fix co_recv coroutine context
AHCI: Fix port reset race
rewrite QEMU_BUILD_BUG_ON
qcow2: Keep unknown header extension when rewriting header
qcow2: Update whole header at once
vpc: Round up image size during fixed image creation
vpc: Add support for Fixed Disk type
iSCSI: add configuration variables for iSCSI
qemu-io: add write -z option for bdrv_co_write_zeroes
qed: add .bdrv_co_write_zeroes() support
qed: replace is_write with flags field
block: perform zero-detection during copy-on-read
block: add .bdrv_co_write_zeroes() interface
cutils: extract buffer_is_zero() from qemu-img.c
Diffstat (limited to 'hw/ide')
-rw-r--r-- | hw/ide/ahci.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index c360399..b515f41 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; @@ -560,6 +562,11 @@ static void ahci_reset_port(AHCIState *s, int port) ncq_tfs->aiocb = NULL; } + /* Maybe we just finished the request thanks to bdrv_aio_cancel() */ + if (!ncq_tfs->used) { + continue; + } + qemu_sglist_destroy(&ncq_tfs->sglist); ncq_tfs->used = 0; } |