From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:54536) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLiyq-0001KX-Oc for qemu-devel@nongnu.org; Wed, 02 Nov 2011 18:08:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RLiyp-0000nd-RZ for qemu-devel@nongnu.org; Wed, 02 Nov 2011 18:08:20 -0400 Received: from mailout-de.gmx.net ([213.165.64.22]:48363) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1RLiyp-0000nU-CB for qemu-devel@nongnu.org; Wed, 02 Nov 2011 18:08:19 -0400 Date: Wed, 02 Nov 2011 23:08:10 +0100 From: "Thomas Schmitt" References: <9744301311355@192.168.2.69> In-Reply-To: <9744301311355@192.168.2.69> Message-Id: <974427254830@192.168.2.69> Subject: Re: [Qemu-devel] Do you have a use for a tester of virtio-scsi with CD drives ? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, stefanha@gmail.com, pbonzini@redhat.com Hi, i forgot to address this concern: Paolo Bonzini wrote: > The page length is indeed 18 for IDE and 20 for SCSI. I made some changes > to that page recently, but left the 18 because I feared causing regression. > But if that is a bug, we can probably fix it in 1.0. The SCSI client is supposed to announce a maximum desired amount of reply data with MODE SENSE. I see this Allocation Length in use inside hw/ide/atapi.c:cmd_mode_sense() if (buf[0] == GPCMD_MODE_SENSE_10) { max_len = ube16_to_cpu(buf + 7); } else { max_len = buf[4]; } ... ide_atapi_cmd_reply(s, 28, max_len); and static void ide_atapi_cmd_reply(IDEState *s, int size, int max_size) { if (size > max_size) size = max_size; So no driver or application should get overwhelmed by two bytes more of size, if it correctly submitted its own desired number as Allocation Length of the commands MODE SENSE(6) or MODE SENSE(10). Have a nice day :) Thomas