From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:49924) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLgqA-0006Ad-3D for qemu-devel@nongnu.org; Wed, 02 Nov 2011 15:51:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RLgq9-0004FC-77 for qemu-devel@nongnu.org; Wed, 02 Nov 2011 15:51:14 -0400 Received: from lo.gmane.org ([80.91.229.12]:43014) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLgq9-0004F2-1t for qemu-devel@nongnu.org; Wed, 02 Nov 2011 15:51:13 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RLgq5-0005zJ-Q2 for qemu-devel@nongnu.org; Wed, 02 Nov 2011 20:51:09 +0100 Received: from 93-34-200-62.ip51.fastwebnet.it ([93.34.200.62]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 02 Nov 2011 20:51:09 +0100 Received: from pbonzini by 93-34-200-62.ip51.fastwebnet.it with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 02 Nov 2011 20:51:09 +0100 From: Paolo Bonzini Date: Wed, 02 Nov 2011 20:50:54 +0100 Message-ID: References: <4EB170FB.6070909@redhat.com> <97443364817519@192.168.2.69> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit In-Reply-To: <97443364817519@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 On 11/02/2011 07:05 PM, Thomas Schmitt 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. > This riddles me. > In hw/scsi-disk.c:mode_sense_page() i see that the page 0x2A > (now MODE_PAGE_CAPABILITIES) gets filled with 22 bytes, compliant > to MMC-1. (Later MMCs have longer minimum sizes.) Ok, in your counting I should have written 20 for IDE (0x12 + page number + page size) and 22 for SCSI (0x14 + page number + page size). > But libburn receives only 20 of them, because the Page Length > is reported as 0x12 in the 10th byte of the reply: > MODE SENSE > 5a 00 2a 00 00 00 00 00 1c 00 > From drive: 28b > 00 22 70 00 00 00 00 00 2a 12 00 00 71 60 29 00 02 c2 00 02 > 02 00 02 c2 00 00 00 00 > Nevertheless i see in hw/scsi-disk.c > p[1] = 0x14; > So how is this altered to 0x12 in the further course of processing ? Because you're using an *IDE* (ATAPI) CD-ROM, not SCSI. See hw/ide/atapi.c. Paolo