From: Alex Williamson <alex.williamson@redhat.com>
To: qemu-devel@nongnu.org, anthony@codemonkey.ws
Cc: alex.williamson@redhat.com, glommer@redhat.com
Subject: [Qemu-devel] [PATCH] e1000: Fix hotplug
Date: Mon, 02 Aug 2010 15:15:17 -0600 [thread overview]
Message-ID: <20100802211121.5497.36512.stgit@localhost6.localdomain6> (raw)
When we removed the call to e1000_reset() back in cset c1699988, we
left some register state uninitialized. When we hotplug the device,
we don't go through a reset cycle, which means a hot added e1000 is
useless until the VM reboots. Duplicate the bits we need from
e1000_reset().
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
---
0.13 candidate?
hw/e1000.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/hw/e1000.c b/hw/e1000.c
index 80b78bc..eb323d2 100644
--- a/hw/e1000.c
+++ b/hw/e1000.c
@@ -1129,6 +1129,10 @@ static int pci_e1000_init(PCIDevice *pci_dev)
checksum = (uint16_t) EEPROM_SUM - checksum;
d->eeprom_data[EEPROM_CHECKSUM_REG] = checksum;
+ memmove(d->phy_reg, phy_reg_init, sizeof phy_reg_init);
+ memmove(d->mac_reg, mac_reg_init, sizeof mac_reg_init);
+ d->rxbuf_min_shift = 1;
+
d->nic = qemu_new_nic(&net_e1000_info, &d->conf,
d->dev.qdev.info->name, d->dev.qdev.id, d);
next reply other threads:[~2010-08-02 21:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-02 21:15 Alex Williamson [this message]
2010-08-02 21:29 ` [Qemu-devel] Re: [PATCH] e1000: Fix hotplug Alex Williamson
2010-08-03 12:17 ` Glauber Costa
2010-08-03 16:18 ` Alex Williamson
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=20100802211121.5497.36512.stgit@localhost6.localdomain6 \
--to=alex.williamson@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=glommer@redhat.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).