From 571c94f2e120590d139eca8f508b147127882135 Mon Sep 17 00:00:00 2001 Message-Id: <571c94f2e120590d139eca8f508b147127882135.1357660440.git.minovotn@redhat.com> In-Reply-To: References: From: Amos Kong Date: Sun, 6 Jan 2013 06:07:46 +0100 Subject: [PATCH 3/4] rtl8139: preserve link state across device reset RH-Author: Amos Kong Message-id: <1357452466-14103-3-git-send-email-akong@redhat.com> Patchwork-id: 45596 O-Subject: [RHEL-6.4 qemu-kvm PATCH 2/2] rtl8139: preserve link state across device reset Bugzilla: 890288 RH-Acked-by: Xiao Wang RH-Acked-by: Stefan Hajnoczi RH-Acked-by: Vlad Yasevich A device reset does not affect the link state, only set_link does. Signed-off-by: Amos Kong --- hw/rtl8139.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) Signed-off-by: Michal Novotny --- hw/rtl8139.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/rtl8139.c b/hw/rtl8139.c index 0403686..e515488 100644 --- a/hw/rtl8139.c +++ b/hw/rtl8139.c @@ -1274,7 +1274,8 @@ static void rtl8139_reset(DeviceState *d) s->BasicModeStatus = 0x7809; //s->BasicModeStatus |= 0x0040; /* UTP medium */ s->BasicModeStatus |= 0x0020; /* autonegotiation completed */ - s->BasicModeStatus |= 0x0004; /* link is up */ + /* preserve link state */ + s->BasicModeStatus |= s->nic->nc.link_down ? 0 : 0x04; s->NWayAdvert = 0x05e1; /* all modes, full duplex */ s->NWayLPAR = 0x05e1; /* all modes, full duplex */ -- 1.7.11.7