qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH] pcnet: Extend hardware reset
Date: Thu, 08 Oct 2009 17:53:53 +0200	[thread overview]
Message-ID: <4ACE0B11.3010901@siemens.com> (raw)

Update the IRQ state and stop the poll timer on reset. Moreover,
register the reset function with qemu.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

 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;
 }

                 reply	other threads:[~2009-10-08 15:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ACE0B11.3010901@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).