aboutsummaryrefslogtreecommitdiff
path: root/hw/ide/piix.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/piix.c
parentb55a37c981914aa8ecd21b9a2a2fb37f39b917c5 (diff)
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/piix.c')
-rw-r--r--hw/ide/piix.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/ide/piix.c b/hw/ide/piix.c
index 60b37a36a5..8958d56a5c 100644
--- a/hw/ide/piix.c
+++ b/hw/ide/piix.c
@@ -101,8 +101,10 @@ static void piix3_reset(void *opaque)
uint8_t *pci_conf = d->dev.config;
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]);
+ }
pci_conf[0x04] = 0x00;
pci_conf[0x05] = 0x00;