From c3ceee56d6d43cd234fcc297b802d68a53b3a12a Mon Sep 17 00:00:00 2001 From: Amos Kong Date: Tue, 5 Nov 2013 09:17:39 +0100 Subject: [PATCH 07/25] net: update nic info during device reset RH-Author: Amos Kong Message-id: <1383643062-1844-2-git-send-email-akong@redhat.com> Patchwork-id: 55368 O-Subject: [RHEL-7.0 qemu-kvm PATCH 1/4] net: update nic info during device reset Bugzilla: 922589 RH-Acked-by: Vlad Yasevich RH-Acked-by: Alex Williamson RH-Acked-by: Xiao Wang RH-Acked-by: Michael S. Tsirkin Bugzilla: 922589 macaddr is reset during device reset, but nic info isn't updated, this problem exists in e1000 & rtl8139 Signed-off-by: Amos Kong Acked-by: Michael S. Tsirkin Signed-off-by: Stefan Hajnoczi (cherry picked from commit 655d3b63b036b70714adbdae685055f1bda0f8f1) --- hw/net/e1000.c | 1 + hw/net/rtl8139.c | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) Signed-off-by: Miroslav Rezanina --- hw/net/e1000.c | 1 + hw/net/rtl8139.c | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/net/e1000.c b/hw/net/e1000.c index a813523..d273ef2 100644 --- a/hw/net/e1000.c +++ b/hw/net/e1000.c @@ -315,6 +315,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 8f20ef4..3ff5518 100644 --- a/hw/net/rtl8139.c +++ b/hw/net/rtl8139.c @@ -1202,6 +1202,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.7.1