|
|
9ae3a8 |
From c3ceee56d6d43cd234fcc297b802d68a53b3a12a Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Amos Kong <akong@redhat.com>
|
|
|
9ae3a8 |
Date: Tue, 5 Nov 2013 09:17:39 +0100
|
|
|
9ae3a8 |
Subject: [PATCH 07/25] net: update nic info during device reset
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
RH-Author: Amos Kong <akong@redhat.com>
|
|
|
9ae3a8 |
Message-id: <1383643062-1844-2-git-send-email-akong@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 55368
|
|
|
9ae3a8 |
O-Subject: [RHEL-7.0 qemu-kvm PATCH 1/4] net: update nic info during device reset
|
|
|
9ae3a8 |
Bugzilla: 922589
|
|
|
9ae3a8 |
RH-Acked-by: Vlad Yasevich <vyasevic@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Alex Williamson <alex.williamson@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Xiao Wang <jasowang@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Bugzilla: 922589
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
macaddr is reset during device reset, but nic info
|
|
|
9ae3a8 |
isn't updated, this problem exists in e1000 & rtl8139
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Amos Kong <akong@redhat.com>
|
|
|
9ae3a8 |
Acked-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
9ae3a8 |
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
9ae3a8 |
(cherry picked from commit 655d3b63b036b70714adbdae685055f1bda0f8f1)
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
hw/net/e1000.c | 1 +
|
|
|
9ae3a8 |
hw/net/rtl8139.c | 1 +
|
|
|
9ae3a8 |
2 files changed, 2 insertions(+), 0 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
hw/net/e1000.c | 1 +
|
|
|
9ae3a8 |
hw/net/rtl8139.c | 1 +
|
|
|
9ae3a8 |
2 files changed, 2 insertions(+), 0 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/hw/net/e1000.c b/hw/net/e1000.c
|
|
|
9ae3a8 |
index a813523..d273ef2 100644
|
|
|
9ae3a8 |
--- a/hw/net/e1000.c
|
|
|
9ae3a8 |
+++ b/hw/net/e1000.c
|
|
|
9ae3a8 |
@@ -315,6 +315,7 @@ static void e1000_reset(void *opaque)
|
|
|
9ae3a8 |
d->mac_reg[RA] |= macaddr[i] << (8 * i);
|
|
|
9ae3a8 |
d->mac_reg[RA + 1] |= (i < 2) ? macaddr[i + 4] << (8 * i) : 0;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
+ qemu_format_nic_info_str(qemu_get_queue(d->nic), macaddr);
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
static void
|
|
|
9ae3a8 |
diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c
|
|
|
9ae3a8 |
index 8f20ef4..3ff5518 100644
|
|
|
9ae3a8 |
--- a/hw/net/rtl8139.c
|
|
|
9ae3a8 |
+++ b/hw/net/rtl8139.c
|
|
|
9ae3a8 |
@@ -1202,6 +1202,7 @@ static void rtl8139_reset(DeviceState *d)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
/* restore MAC address */
|
|
|
9ae3a8 |
memcpy(s->phys, s->conf.macaddr.a, 6);
|
|
|
9ae3a8 |
+ qemu_format_nic_info_str(qemu_get_queue(s->nic), s->phys);
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
/* reset interrupt mask */
|
|
|
9ae3a8 |
s->IntrStatus = 0;
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.7.1
|
|
|
9ae3a8 |
|