From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MR3Re-0006x2-Nr for qemu-devel@nongnu.org; Wed, 15 Jul 2009 08:18:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MR3Ra-0006sA-Tx for qemu-devel@nongnu.org; Wed, 15 Jul 2009 08:18:46 -0400 Received: from [199.232.76.173] (port=48941 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MR3Ra-0006rs-Oe for qemu-devel@nongnu.org; Wed, 15 Jul 2009 08:18:42 -0400 Received: from mx2.redhat.com ([66.187.237.31]:45247) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MR3Ra-0002bL-7A for qemu-devel@nongnu.org; Wed, 15 Jul 2009 08:18:42 -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 n6FCIcQp025100 for ; Wed, 15 Jul 2009 08:18:38 -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 n6FCIbPm002689 for ; Wed, 15 Jul 2009 08:18:38 -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 n6FCIaAJ028782 for ; Wed, 15 Jul 2009 08:18:37 -0400 Message-ID: <4A5DC91F.7010009@redhat.com> Date: Wed, 15 Jul 2009 15:18:39 +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] 2nd try: [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 After comments from quintela@trasno.org and mst@redhat.com, here's the 2nd try: 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. Signed-off-by: Naphtali Sprei --- hw/e1000.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/e1000.c b/hw/e1000.c index 4ac8918..15598ab 100644 --- a/hw/e1000.c +++ b/hw/e1000.c @@ -262,6 +262,8 @@ set_eecd(E1000State *s, int index, uint32_t val) } if (!(val & E1000_EECD_CS)) { // rising, no CS (EEPROM reset) memset(&s->eecd_state, 0, sizeof s->eecd_state); + // restore old_eecd's E1000_EECD_SK to avoid false detection of a clock edge + s->eecd_state.old_eecd = E1000_EECD_SK; return; } s->eecd_state.val_in <<= 1; -- 1.5.5.6