From: Amos Kong <akong@redhat.com>
To: qemu-devel@nongnu.org
Cc: jan.kiszka@siemens.com, jasowang@redhat.com,
Amos Kong <akong@redhat.com>,
stefanha@redhat.com
Subject: [Qemu-devel] [PATCH 2/2] rtl8139: preserve link state across device reset
Date: Fri, 28 Dec 2012 17:29:11 +0800 [thread overview]
Message-ID: <1356686951-20305-3-git-send-email-akong@redhat.com> (raw)
In-Reply-To: <1356686951-20305-1-git-send-email-akong@redhat.com>
A device reset does not affect the link state, only set_link does.
Signed-off-by: Amos Kong <akong@redhat.com>
---
hw/rtl8139.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/rtl8139.c b/hw/rtl8139.c
index c59ec6b..3e08062 100644
--- a/hw/rtl8139.c
+++ b/hw/rtl8139.c
@@ -1258,7 +1258,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.10.1
next prev parent reply other threads:[~2012-12-28 9:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-28 9:29 [Qemu-devel] [PATCH 0/2] fix of preserving link status Amos Kong
2012-12-28 9:29 ` [Qemu-devel] [PATCH 1/2] e1000: no need auto-negotiation if link was down Amos Kong
2013-01-03 12:20 ` Stefan Hajnoczi
2013-01-05 8:45 ` Jason Wang
2013-01-06 5:11 ` Amos Kong
2013-01-07 12:59 ` Stefan Hajnoczi
2013-01-08 9:45 ` Amos Kong
2013-01-08 17:07 ` Stefan Hajnoczi
2012-12-28 9:29 ` Amos Kong [this message]
2013-01-03 12:21 ` [Qemu-devel] [PATCH 0/2] fix of preserving link status 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=1356686951-20305-3-git-send-email-akong@redhat.com \
--to=akong@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=jasowang@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).