summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaphtali Sprei <nsprei@redhat.com>2009-07-16 11:34:17 +0300
committerEduardo Habkost <ehabkost@redhat.com>2009-07-21 18:44:42 -0300
commit6e64837323e3ae2975e57e8e9d4cc99f07566622 (patch)
tree289a3fe356c60a78d48ad716bdd59c7fd11dea63
parente0b7e7d3690f5c8144b35357580647a0149afaad (diff)
fix for bug #507942 : bad macaddr of e1000 in Windows 2003 server with original Microsoft driver
Minor comment change (to last sent patch) and fixed WS issue of the patch. 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> Message-ID: <4A5EE609.3090104@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Bugzilla: 507942 Acked-by: Juan Quintela <quintela@redhat.com> Acked-by: Luiz Capitulino <lcapitulino@redhat.com> Acked-by: Eduardo Habkost <ehabkost@redhat.com>
-rw-r--r--qemu/hw/e1000.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/qemu/hw/e1000.c b/qemu/hw/e1000.c
index d12e14ff..48b5d84f 100644
--- a/qemu/hw/e1000.c
+++ b/qemu/hw/e1000.c
@@ -263,6 +263,9 @@ 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;