qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [COMMIT 356c7ff] fix for bad macaddr of e1000 in Windows


From: Anthony Liguori
Subject: [Qemu-commits] [COMMIT 356c7ff] fix for bad macaddr of e1000 in Windows 2003 serverwith original MS driver
Date: Thu, 16 Jul 2009 23:12:52 -0000

From: Naphtali Sprei <address@hidden>

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 <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>

diff --git a/hw/e1000.c b/hw/e1000.c
index c4f1ccf..9bc4442 100644
--- a/hw/e1000.c
+++ b/hw/e1000.c
@@ -261,6 +261,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;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]