eepro100: Add diagnose command
authorStefan Weil <weil@mail.berlios.de>
Tue, 2 Mar 2010 21:37:58 +0000 (22:37 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 3 Mar 2010 11:44:32 +0000 (13:44 +0200)
Real hardware would run an internal self-test.
The emulation just returns a passed status.

Original patch was from Reimar Döffinger, thanks.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/eepro100.c

index e10ce62..0f07b70 100644 (file)
@@ -958,6 +958,11 @@ static void action_command(EEPRO100State *s)
             /* Starting with offset 8, the command contains
              * 64 dwords microcode which we just ignore here. */
             break;
+        case CmdDiagnose:
+            TRACE(OTHER, logout("diagnose\n"));
+            /* Make sure error flag is not set. */
+            s->tx.status = 0;
+            break;
         default:
             missing("undefined command");
             success = false;