From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MR1PE-0002Kw-C6 for qemu-devel@nongnu.org; Wed, 15 Jul 2009 06:08:08 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MR1P9-0002GI-63 for qemu-devel@nongnu.org; Wed, 15 Jul 2009 06:08:07 -0400 Received: from [199.232.76.173] (port=56810 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MR1P9-0002GD-2L for qemu-devel@nongnu.org; Wed, 15 Jul 2009 06:08:03 -0400 Received: from mx2.redhat.com ([66.187.237.31]:37774) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MR1P8-0001DB-Jk for qemu-devel@nongnu.org; Wed, 15 Jul 2009 06:08:02 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n6FA80ii022434 for ; Wed, 15 Jul 2009 06:08:01 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n6FA80Zt002339 for ; Wed, 15 Jul 2009 06:08:00 -0400 Received: from [10.35.0.223] (dhcp-0-223.tlv.redhat.com [10.35.0.223]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n6FA7w56008025 for ; Wed, 15 Jul 2009 06:07:59 -0400 Message-ID: <4A5DAA81.2000105@redhat.com> Date: Wed, 15 Jul 2009 13:08:01 +0300 From: Naphtali Sprei MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] fix for bad macaddr of e1000 in Windows 2003 server with original Microsoft driver List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org The sequence of reading from eeprom is "offset by one" moved because of a false detection of a clock cycle after an eeprom reset. Keeping the last clock value after a reset keeps it in sync. --- hw/e1000.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/e1000.c b/hw/e1000.c index 4ac8918..7d7cc2e 100644 --- a/hw/e1000.c +++ b/hw/e1000.c @@ -261,7 +261,10 @@ set_eecd(E1000State *s, int index, uint32_t val) return; } if (!(val & E1000_EECD_CS)) { // rising, no CS (EEPROM reset) + // save/restore old_eecd to avoid false detection of a clock edge + uint32_t keep = s->eecd_state.old_eecd; memset(&s->eecd_state, 0, sizeof s->eecd_state); + s->eecd_state.old_eecd = keep; return; } s->eecd_state.val_in <<= 1; -- 1.5.5.6