From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MvvJc-0005RP-Uh for qemu-devel@nongnu.org; Thu, 08 Oct 2009 11:54:05 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MvvJZ-0005Np-3I for qemu-devel@nongnu.org; Thu, 08 Oct 2009 11:54:04 -0400 Received: from [199.232.76.173] (port=45274 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvvJY-0005NL-8y for qemu-devel@nongnu.org; Thu, 08 Oct 2009 11:54:00 -0400 Received: from thoth.sbs.de ([192.35.17.2]:15387) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MvvJX-0001Hb-J0 for qemu-devel@nongnu.org; Thu, 08 Oct 2009 11:54:00 -0400 Received: from mail2.siemens.de (localhost [127.0.0.1]) by thoth.sbs.de (8.12.11.20060308/8.12.11) with ESMTP id n98Frsgk003260 for ; Thu, 8 Oct 2009 17:53:54 +0200 Received: from [139.25.109.167] (mchn012c.ww002.siemens.net [139.25.109.167] (may be forged)) by mail2.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id n98Frrtt018444 for ; Thu, 8 Oct 2009 17:53:54 +0200 Message-ID: <4ACE0B11.3010901@siemens.com> Date: Thu, 08 Oct 2009 17:53:53 +0200 From: Jan Kiszka MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] pcnet: Extend hardware reset List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel Update the IRQ state and stop the poll timer on reset. Moreover, register the reset function with qemu. Signed-off-by: Jan Kiszka --- hw/pcnet.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/pcnet.c b/hw/pcnet.c index afeaca7..fecbff7 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; }