qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] atapi bug
@ 2004-01-24 18:40 Jens Axboe
  0 siblings, 0 replies; only message in thread
From: Jens Axboe @ 2004-01-24 18:40 UTC (permalink / raw)
  To: qemu-devel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-01-24 18:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-24 18:40 [Qemu-devel] atapi bug Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).