From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:37355) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rx8rr-0000mX-1T for qemu-devel@nongnu.org; Mon, 13 Feb 2012 22:15:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rx8rp-0005ZL-Lt for qemu-devel@nongnu.org; Mon, 13 Feb 2012 22:15:46 -0500 Received: from mail-iy0-f173.google.com ([209.85.210.173]:35735) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rx8rp-0005ZC-HL for qemu-devel@nongnu.org; Mon, 13 Feb 2012 22:15:45 -0500 Received: by iahk25 with SMTP id k25so5882384iah.4 for ; Mon, 13 Feb 2012 19:15:44 -0800 (PST) From: bo.novell@gmail.com Date: Tue, 14 Feb 2012 11:10:19 +0800 Message-Id: <1329189019-13710-1-git-send-email-bo.novell@gmail.com> Subject: [Qemu-devel] [PATCH] RTL8139 hotplug is broken on windows 2008 sp2. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Bo Yang From: Bo Yang Windows 2008 sp2 tries to read mac address from phys and then write the read value into it. This patch is a workaround for the issue. Signed-off-by: Bo Yang --- hw/rtl8139.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/rtl8139.c b/hw/rtl8139.c index 1668390..074a14a 100644 --- a/hw/rtl8139.c +++ b/hw/rtl8139.c @@ -3476,6 +3476,8 @@ static int pci_rtl8139_init(PCIDevice *dev) s->eeprom.contents[7] = s->conf.macaddr.a[0] | s->conf.macaddr.a[1] << 8; s->eeprom.contents[8] = s->conf.macaddr.a[2] | s->conf.macaddr.a[3] << 8; s->eeprom.contents[9] = s->conf.macaddr.a[4] | s->conf.macaddr.a[5] << 8; + /* workaround broken windows 2008 sp2 driver. */ + memcpy(s->phys, s->conf.macaddr.a, 6); s->nic = qemu_new_nic(&net_rtl8139_info, &s->conf, object_get_typename(OBJECT(dev)), dev->qdev.id, s); -- 1.6.0.2