From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:40932) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpfnC-0003cq-BE for qemu-devel@nongnu.org; Tue, 24 Jan 2012 07:48:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rpfn6-0006l1-Mi for qemu-devel@nongnu.org; Tue, 24 Jan 2012 07:48:06 -0500 Message-ID: <4F1EA87C.7090708@siemens.com> Date: Tue, 24 Jan 2012 13:47:56 +0100 From: Jan Kiszka MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] pcnet: Preserve link state across device reset List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel , Anthony Liguori Cc: qemu-stable@nongnu.org A device reset does not affect the link state, only set_link does. Signed-off-by: Jan Kiszka --- 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