From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MgLwc-0002KC-6J for qemu-devel@nongnu.org; Wed, 26 Aug 2009 13:05:58 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MgLwT-00027G-Tx for qemu-devel@nongnu.org; Wed, 26 Aug 2009 13:05:54 -0400 Received: from [199.232.76.173] (port=45775 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MgLwT-00026w-ON for qemu-devel@nongnu.org; Wed, 26 Aug 2009 13:05:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56678) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MgLwS-0000WY-VO for qemu-devel@nongnu.org; Wed, 26 Aug 2009 13:05:49 -0400 From: Glauber Costa Date: Wed, 26 Aug 2009 09:05:35 -0400 Message-Id: <1251291946-25821-2-git-send-email-glommer@redhat.com> In-Reply-To: <1251291946-25821-1-git-send-email-glommer@redhat.com> References: <1251291946-25821-1-git-send-email-glommer@redhat.com> Subject: [Qemu-devel] [PATCH 01/12] fix for bad macaddr of e1000 in Windows 2003 server with original MS driver List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, Naphtali Sprei From: Naphtali Sprei 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 Signed-off-by: Anthony Liguori Signed-off-by: Glauber Costa --- hw/e1000.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/hw/e1000.c b/hw/e1000.c index 8c1741f..76fa159 100644 --- a/hw/e1000.c +++ b/hw/e1000.c @@ -262,6 +262,11 @@ 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 (known to be on) + * to avoid false detection of a clock edge + */ + s->eecd_state.old_eecd = E1000_EECD_SK; return; } s->eecd_state.val_in <<= 1; -- 1.6.2.2