From: Jan Kiszka Date: Tue, 24 Jan 2012 12:47:56 +0000 (+0100) Subject: pcnet: Preserve link state across device reset X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=9f2a8d7ae8a74726024cc6b820e58d841199d37b;p=qemu-xen-4.4-testing.git pcnet: Preserve link state across device reset A device reset does not affect the link state, only set_link does. Signed-off-by: Jan Kiszka Signed-off-by: Stefan Hajnoczi --- diff --git a/hw/pcnet.c b/hw/pcnet.c index 306dc6ed7..6aa48e0d2 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; }