ahci: Fix FLUSH command
commita62eaa26c1d6d48fbdc3ac1d32bd1314f5fdc8c9
authorKevin Wolf <kwolf@redhat.com>
Mon, 15 Jul 2013 09:25:55 +0000 (15 11:25 +0200)
committerKevin Wolf <kwolf@redhat.com>
Mon, 15 Jul 2013 09:53:55 +0000 (15 11:53 +0200)
tree9b5f353025bb767ad0fbf10fc9d6488be7831b13
parent0e1146a7a011a69d8cbc958b4f7ebad186730fc3
ahci: Fix FLUSH command

AHCI couldn't cope with asynchronous commands that aren't doing DMA, it
simply wouldn't complete them. Due to the bug fixed in commit f68ec837,
FLUSH commands would seem to have completed immediately even if they
were still running on the host. After the commit, they would simply hang
and never unset the BSY bit, rendering AHCI unusable on any OS sending
flushes.

This patch adds another callback for the completion of asynchronous
commands. This is what AHCI really wants to use for its command
completion logic rather than an DMA completion callback.

Cc: qemu-stable@nongnu.org
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
hw/ide/ahci.c
hw/ide/core.c
hw/ide/internal.h