qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] atapi bug


From: Jens Axboe
Subject: [Qemu-devel] atapi bug
Date: Sat, 24 Jan 2004 19:40:24 +0100

Hi,

There's a pretty big atapi bug in current cvs as well. If the command
opcode is unknown, sense _must_ be 5/20/0 not 5/24/0 which is what qemu
currently uses. The latter should be used for known/supported commands,
but with invalid fields set in the remainder of the cdb (ie not opcode
itself.

Index: ide.c
===================================================================
RCS file: /cvsroot/qemu/qemu/ide.c,v
retrieving revision 1.6
diff -u -r1.6 ide.c
--- ide.c       22 Jan 2004 23:52:27 -0000      1.6
+++ ide.c       24 Jan 2004 18:39:21 -0000
@@ -299,6 +299,7 @@
 #define ATAPI_INT_REASON_TAG            0xf8
 
 /* same constants as bochs */
+#define ASC_ILLEGAL_OPCODE                  0x20
 #define ASC_LOGICAL_BLOCK_OOR                0x21
 #define ASC_INV_FIELD_IN_CMD_PACKET          0x24
 #define ASC_MEDIUM_NOT_PRESENT               0x3a
@@ -1041,8 +1042,8 @@
         break;
     default:
         error_cmd:
-        ide_atapi_cmd_error(s, SENSE_ILLEGAL_REQUEST, 
-                            ASC_INV_FIELD_IN_CMD_PACKET);
+        ide_atapi_cmd_error(s, SENSE_ILLEGAL_REQUEST,
+                            ASC_ILLEGAL_OPCODE);
         break;
     }
 }

-- 
Jens Axboe





reply via email to

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