aboutsummaryrefslogtreecommitdiff
path: root/hw/ide/isa.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/ide/isa.c')
-rw-r--r--hw/ide/isa.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/ide/isa.c b/hw/ide/isa.c
index fe67bcdf7c..dff7c796f7 100644
--- a/hw/ide/isa.c
+++ b/hw/ide/isa.c
@@ -44,6 +44,13 @@ typedef struct ISAIDEState {
qemu_irq irq;
} ISAIDEState;
+static void isa_ide_reset(DeviceState *d)
+{
+ ISAIDEState *s = container_of(d, ISAIDEState, dev.qdev);
+
+ ide_bus_reset(&s->bus);
+}
+
static const VMStateDescription vmstate_ide_isa = {
.name = "isa-ide",
.version_id = 3,
@@ -93,6 +100,7 @@ static ISADeviceInfo isa_ide_info = {
.qdev.name = "isa-ide",
.qdev.size = sizeof(ISAIDEState),
.init = isa_ide_initfn,
+ .qdev.reset = isa_ide_reset,
.qdev.props = (Property[]) {
DEFINE_PROP_HEX32("iobase", ISAIDEState, iobase, 0x1f0),
DEFINE_PROP_HEX32("iobase2", ISAIDEState, iobase2, 0x3f6),