aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2009-10-08 17:53:53 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-10-15 09:32:04 -0500
commitde41ac924bb2cf7cb8aaaa8c7f95a38c6d9b3783 (patch)
treebc6efc42d43b663a1d4534f59292de33ed63b814 /hw
parentef845c3bf421290153154635dc18eaa677cecb43 (diff)
pcnet: Extend hardware reset
Update the IRQ state and stop the poll timer on reset. Moreover, register the reset function with qemu. Patchworks-ID: 35462 Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/pcnet.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/pcnet.c b/hw/pcnet.c
index afeaca7f1d..fecbff7db4 100644
--- a/hw/pcnet.c
+++ b/hw/pcnet.c
@@ -1624,6 +1624,8 @@ static void pcnet_h_reset(void *opaque)
s->bcr[BCR_PLAT ] = 0xff06;
pcnet_s_reset(s);
+ pcnet_update_irq(s);
+ pcnet_poll_timer(s);
}
static void pcnet_aprom_writeb(void *opaque, uint32_t addr, uint32_t val)
@@ -1966,6 +1968,7 @@ static int pcnet_common_init(DeviceState *dev, PCNetState *s,
s->vc = qdev_get_vlan_client(dev,
pcnet_can_receive, pcnet_receive, NULL,
cleanup, s);
+ qemu_register_reset(pcnet_h_reset, s);
pcnet_h_reset(s);
return 0;
}