aboutsummaryrefslogtreecommitdiff
path: root/hw/eepro100.c
diff options
context:
space:
mode:
authorStefan Weil <weil@mail.berlios.de>2010-03-02 22:37:54 +0100
committerMichael S. Tsirkin <mst@redhat.com>2010-03-03 13:34:10 +0200
commitcb25a3fb6001067a10ff420ba98179a3fe30aef2 (patch)
tree18bb89ebe1fa621c0f13078a4f285b773657ac7e /hw/eepro100.c
parente824012bc2d935073cb72fe32f3471441af9fc32 (diff)
eepro100: Fix CU Start command
CU Start is allowed when the CU is in the idle or suspended state. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/eepro100.c')
-rw-r--r--hw/eepro100.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/hw/eepro100.c b/hw/eepro100.c
index 40d8db5f86..a9bf7a0a5a 100644
--- a/hw/eepro100.c
+++ b/hw/eepro100.c
@@ -976,17 +976,17 @@ static void action_command(EEPRO100State *s)
static void eepro100_cu_command(EEPRO100State * s, uint8_t val)
{
+ cu_state_t cu_state;
switch (val) {
case CU_NOP:
/* No operation. */
break;
case CU_START:
- if (get_cu_state(s) != cu_idle) {
- /* Intel documentation says that CU must be idle for the CU
- * start command. Intel driver for Linux also starts the CU
- * from suspended state. */
- logout("CU state is %u, should be %u\n", get_cu_state(s), cu_idle);
- //~ assert(!"wrong CU state");
+ cu_state = get_cu_state(s);
+ if (cu_state != cu_idle && cu_state != cu_suspended) {
+ /* Intel documentation says that CU must be idle or suspended
+ * for the CU start command. */
+ logout("unexpected CU state is %u\n", cu_state);
}
set_cu_state(s, cu_active);
s->cu_offset = s->pointer;