qemu-stable
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-stable] [PATCH] pcnet: Preserve link state across device reset


From: Jan Kiszka
Subject: [Qemu-stable] [PATCH] pcnet: Preserve link state across device reset
Date: Tue, 24 Jan 2012 13:47:56 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

A device reset does not affect the link state, only set_link does.

Signed-off-by: Jan Kiszka <address@hidden>
---
 hw/pcnet.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/hw/pcnet.c b/hw/pcnet.c
index 306dc6e..6aa48e0 100644
--- a/hw/pcnet.c
+++ b/hw/pcnet.c
@@ -688,7 +688,6 @@ static void pcnet_s_reset(PCNetState *s)
     printf("pcnet_s_reset\n");
 #endif
 
-    s->lnkst = 0x40;
     s->rdra = 0;
     s->tdra = 0;
     s->rap = 0;
@@ -1751,5 +1750,7 @@ int pcnet_common_init(DeviceState *dev, PCNetState *s, 
NetClientInfo *info)
     }
     *(uint16_t *)&s->prom[12] = cpu_to_le16(checksum);
 
+    s->lnkst = 0x40; /* initial link state: up */
+
     return 0;
 }
-- 
1.7.3.4



reply via email to

[Prev in Thread] Current Thread [Next in Thread]