summaryrefslogtreecommitdiff
path: root/hw/ide/cmd646.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2009-11-07 14:13:05 +0000
committerBlue Swirl <blauwirbel@gmail.com>2009-11-07 14:13:05 +0000
commit4a6435639781214a14f3c6054955e5ef16298d72 (patch)
treefb4d38641d83dc4bf98b56aa91a0d070db0ae425 /hw/ide/cmd646.c
parentb55a37c981914aa8ecd21b9a2a2fb37f39b917c5 (diff)
downloadqemu-4a6435639781214a14f3c6054955e5ef16298d72.tar.gz
IDE: Fix reset handling
Problem: x86 systems could not survive a few system_resets. Clear most of IDE state when reset. Implement the missing reset handlers. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/ide/cmd646.c')
-rw-r--r--hw/ide/cmd646.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c
index 45e2cdb9a5..b2a3e434b3 100644
--- a/hw/ide/cmd646.c
+++ b/hw/ide/cmd646.c
@@ -193,8 +193,10 @@ static void cmd646_reset(void *opaque)
PCIIDEState *d = opaque;
unsigned int i;
- for (i = 0; i < 2; i++)
- ide_dma_cancel(&d->bmdma[i]);
+ for (i = 0; i < 2; i++) {
+ ide_bus_reset(&d->bus[i]);
+ ide_dma_reset(&d->bmdma[i]);
+ }
}
/* CMD646 PCI IDE controller */