atapi bug
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
ide.c +3 -2
@@ -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 ; } }
Signature · 1 line
Jens Axboe