From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AkSiP-0007w0-VB for qemu-devel@nongnu.org; Sat, 24 Jan 2004 13:41:05 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AkShs-0007qk-Re for qemu-devel@nongnu.org; Sat, 24 Jan 2004 13:41:04 -0500 Received: from [195.184.98.160] (helo=virtualhost.dk) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AkShs-0007pv-Eg for qemu-devel@nongnu.org; Sat, 24 Jan 2004 13:40:32 -0500 Received: from brick.kernel.dk ([62.242.22.158] helo=wiggum.home.kernel.dk) by virtualhost.dk with esmtp (Exim 3.36 #1) id 1AkShp-0008QU-00 for qemu-devel@nongnu.org; Sat, 24 Jan 2004 19:40:29 +0100 Received: from axboe by wiggum.home.kernel.dk with local (Exim 4.22) id 1AkShl-0007NR-0F for qemu-devel@nongnu.org; Sat, 24 Jan 2004 19:40:25 +0100 Date: Sat, 24 Jan 2004 19:40:24 +0100 From: Jens Axboe Message-ID: <20040124184024.GA28342@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] atapi bug Reply-To: qemu-devel@nongnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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