From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:54514) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqgEf-0006SO-Hl for qemu-devel@nongnu.org; Fri, 27 Jan 2012 02:28:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RqgEe-0008UC-Ou for qemu-devel@nongnu.org; Fri, 27 Jan 2012 02:28:37 -0500 Received: from e06smtp16.uk.ibm.com ([195.75.94.112]:34357) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqgEe-0008U3-Gq for qemu-devel@nongnu.org; Fri, 27 Jan 2012 02:28:36 -0500 Received: from /spool/local by e06smtp16.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 27 Jan 2012 07:28:35 -0000 Received: from d06av08.portsmouth.uk.ibm.com (d06av08.portsmouth.uk.ibm.com [9.149.37.249]) by d06nrmr1407.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q0R7SWLC2523186 for ; Fri, 27 Jan 2012 07:28:33 GMT Received: from d06av08.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av08.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q0R7SWa9013676 for ; Fri, 27 Jan 2012 07:28:32 GMT From: Stefan Hajnoczi Date: Fri, 27 Jan 2012 07:28:00 +0000 Message-Id: <1327649282-12431-5-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1327649282-12431-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1327649282-12431-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 4/6] pcnet: Preserve link state across device reset List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Jan Kiszka , qemu-devel@nongnu.org, Stefan Hajnoczi From: Jan Kiszka A device reset does not affect the link state, only set_link does. Signed-off-by: Jan Kiszka Signed-off-by: Stefan Hajnoczi --- hw/pcnet.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/pcnet.c b/hw/pcnet.c index 306dc6e..6aa48e0d 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.8.3