From: Anthony PERARD <anthony.perard@citrix.com>
To: QEMU-devel <qemu-devel@nongnu.org>
Cc: Anthony PERARD <anthony.perard@citrix.com>
Subject: [Qemu-devel] [PATCH] e1000: Do reset when E1000_CTRL_RST bit is set.
Date: Fri, 5 Aug 2011 15:36:15 +0100 [thread overview]
Message-ID: <1312554976-5822-1-git-send-email-anthony.perard@citrix.com> (raw)
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
hw/e1000.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/hw/e1000.c b/hw/e1000.c
index 96d84f9..a1388e9 100644
--- a/hw/e1000.c
+++ b/hw/e1000.c
@@ -150,6 +150,8 @@ static const char phy_regcap[0x20] = {
[PHY_ID2] = PHY_R, [M88E1000_PHY_SPEC_STATUS] = PHY_R
};
+static void e1000_reset(void *opaque);
+
static void
ioport_map(PCIDevice *pci_dev, int region_num, pcibus_t addr,
pcibus_t size, int type)
@@ -202,8 +204,12 @@ rxbufsize(uint32_t v)
static void
set_ctrl(E1000State *s, int index, uint32_t val)
{
- /* RST is self clearing */
- s->mac_reg[CTRL] = val & ~E1000_CTRL_RST;
+ DBGOUT(IO, "set ctrl = %08x\n", val);
+ if (val & E1000_CTRL_RST) {
+ e1000_reset(s);
+ return;
+ }
+ s->mac_reg[CTRL] = val;
}
static void
--
Anthony PERARD
next reply other threads:[~2011-08-05 14:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-05 14:36 Anthony PERARD [this message]
2011-08-05 16:53 ` [Qemu-devel] [PATCH] e1000: Do reset when E1000_CTRL_RST bit is set Anthony Liguori
2011-08-05 18:34 ` Richard Henderson
2011-08-05 18:44 ` Peter Maydell
2011-08-09 14:10 ` Anthony PERARD
2011-08-09 17:10 ` Peter Maydell
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=1312554976-5822-1-git-send-email-anthony.perard@citrix.com \
--to=anthony.perard@citrix.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).