]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
fix for bad macaddr of e1000 in Windows 2003 server with original MS driver
authorNaphtali Sprei <nsprei@redhat.com>
Thu, 16 Jul 2009 15:17:53 +0000 (18:17 +0300)
committerGlauber Costa <glommer@redhat.com>
Mon, 20 Jul 2009 14:14:11 +0000 (10:14 -0400)
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 <nsprei@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Glauber Costa <glommer@redhat.com>
hw/e1000.c

index 8c1741f1785c8a2937b58d3268476e873c1c92fc..76fa159902da02745ed6899bc4327b8a94ed166e 100644 (file)
@@ -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;