From: Stefan Hajnoczi <stefanha@redhat.com>
To: qemu-devel@nongnu.org
Cc: Amos Kong <akong@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Anthony Liguori <aliguori@amazon.com>
Subject: [Qemu-devel] [PULL v2 1/3] net: update nic info during device reset
Date: Fri, 18 Oct 2013 18:38:45 +0200 [thread overview]
Message-ID: <1382114327-29926-2-git-send-email-stefanha@redhat.com> (raw)
In-Reply-To: <1382114327-29926-1-git-send-email-stefanha@redhat.com>
From: Amos Kong <akong@redhat.com>
macaddr is reset during device reset, but nic info
isn't updated, this problem exists in e1000 & rtl8139
Signed-off-by: Amos Kong <akong@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
hw/net/e1000.c | 1 +
hw/net/rtl8139.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/hw/net/e1000.c b/hw/net/e1000.c
index 151d25e..9a1c46e 100644
--- a/hw/net/e1000.c
+++ b/hw/net/e1000.c
@@ -401,6 +401,7 @@ static void e1000_reset(void *opaque)
d->mac_reg[RA] |= macaddr[i] << (8 * i);
d->mac_reg[RA + 1] |= (i < 2) ? macaddr[i + 4] << (8 * i) : 0;
}
+ qemu_format_nic_info_str(qemu_get_queue(d->nic), macaddr);
}
static void
diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c
index c31199f..9b4a650 100644
--- a/hw/net/rtl8139.c
+++ b/hw/net/rtl8139.c
@@ -1214,6 +1214,7 @@ static void rtl8139_reset(DeviceState *d)
/* restore MAC address */
memcpy(s->phys, s->conf.macaddr.a, 6);
+ qemu_format_nic_info_str(qemu_get_queue(s->nic), s->phys);
/* reset interrupt mask */
s->IntrStatus = 0;
--
1.8.3.1
next prev parent reply other threads:[~2013-10-18 16:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-18 16:38 [Qemu-devel] [PULL v2 0/3] Net patches Stefan Hajnoczi
2013-10-18 16:38 ` Stefan Hajnoczi [this message]
2013-10-18 16:38 ` [Qemu-devel] [PULL v2 2/3] net/e1000: update network information when macaddr is changed in guest Stefan Hajnoczi
2013-10-18 16:38 ` [Qemu-devel] [PULL v2 3/3] net/rtl8139: " Stefan Hajnoczi
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=1382114327-29926-2-git-send-email-stefanha@redhat.com \
--to=stefanha@redhat.com \
--cc=akong@redhat.com \
--cc=aliguori@amazon.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.