mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-11 16:00:50 -07:00
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>
This commit is contained in:
parent
ef845c3bf4
commit
de41ac924b
1 changed files with 3 additions and 0 deletions
|
|
@ -1624,6 +1624,8 @@ static void pcnet_h_reset(void *opaque)
|
||||||
s->bcr[BCR_PLAT ] = 0xff06;
|
s->bcr[BCR_PLAT ] = 0xff06;
|
||||||
|
|
||||||
pcnet_s_reset(s);
|
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)
|
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,
|
s->vc = qdev_get_vlan_client(dev,
|
||||||
pcnet_can_receive, pcnet_receive, NULL,
|
pcnet_can_receive, pcnet_receive, NULL,
|
||||||
cleanup, s);
|
cleanup, s);
|
||||||
|
qemu_register_reset(pcnet_h_reset, s);
|
||||||
pcnet_h_reset(s);
|
pcnet_h_reset(s);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue