yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-net-rtl8139-update-network-information-when-macaddr-.patch

9ae3a8
From 1e7727e27ed91dd30b477ef7b78b0f05aba5a364 Mon Sep 17 00:00:00 2001
9ae3a8
From: Amos Kong <akong@redhat.com>
9ae3a8
Date: Tue, 5 Nov 2013 09:17:41 +0100
9ae3a8
Subject: [PATCH 09/25] net/rtl8139: update network information when macaddr is changed in guest
9ae3a8
9ae3a8
RH-Author: Amos Kong <akong@redhat.com>
9ae3a8
Message-id: <1383643062-1844-4-git-send-email-akong@redhat.com>
9ae3a8
Patchwork-id: 55370
9ae3a8
O-Subject: [RHEL-7.0 qemu-kvm PATCH 3/4] net/rtl8139: update network information when macaddr is changed in guest
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
rtl8139 has same problem as e1000, nic info isn't updated when macaddr
9ae3a8
is changed in guest.
9ae3a8
9ae3a8
This patch updates the nic info when the last bit of macaddr is written.
9ae3a8
9ae3a8
Signed-off-by: Amos Kong <akong@redhat.com>
9ae3a8
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
9ae3a8
(cherry picked from commit 23c37c37f0280761072c23bf67d3a4f3c0ff25aa)
9ae3a8
---
9ae3a8
 hw/net/rtl8139.c |    6 +++++-
9ae3a8
 1 files changed, 5 insertions(+), 1 deletions(-)
9ae3a8
9ae3a8
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
---
9ae3a8
 hw/net/rtl8139.c |    6 +++++-
9ae3a8
 1 files changed, 5 insertions(+), 1 deletions(-)
9ae3a8
9ae3a8
diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c
9ae3a8
index 3ff5518..d08106b 100644
9ae3a8
--- a/hw/net/rtl8139.c
9ae3a8
+++ b/hw/net/rtl8139.c
9ae3a8
@@ -2722,8 +2722,12 @@ static void rtl8139_io_writeb(void *opaque, uint8_t addr, uint32_t val)
9ae3a8
 
9ae3a8
     switch (addr)
9ae3a8
     {
9ae3a8
-        case MAC0 ... MAC0+5:
9ae3a8
+        case MAC0 ... MAC0+4:
9ae3a8
+            s->phys[addr - MAC0] = val;
9ae3a8
+            break;
9ae3a8
+        case MAC0+5:
9ae3a8
             s->phys[addr - MAC0] = val;
9ae3a8
+            qemu_format_nic_info_str(qemu_get_queue(s->nic), s->phys);
9ae3a8
             break;
9ae3a8
         case MAC0+6 ... MAC0+7:
9ae3a8
             /* reserved */
9ae3a8
-- 
9ae3a8
1.7.1
9ae3a8