From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:58569) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RMiYe-0004Cl-Kr for qemu-devel@nongnu.org; Sat, 05 Nov 2011 11:53:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RMiYd-000483-LA for qemu-devel@nongnu.org; Sat, 05 Nov 2011 11:53:24 -0400 Received: from mail-ww0-f53.google.com ([74.125.82.53]:48964) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RMiYd-00047u-DO for qemu-devel@nongnu.org; Sat, 05 Nov 2011 11:53:23 -0400 Received: by wwg7 with SMTP id 7so4335882wwg.10 for ; Sat, 05 Nov 2011 08:53:21 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4EB55BED.1080605@redhat.com> Date: Sat, 05 Nov 2011 16:53:17 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <97421768321172@192.168.2.69> <97415193721205@192.168.2.69> In-Reply-To: <97415193721205@192.168.2.69> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Thomas Schmitt Cc: kwolf@redhat.com, stefanha@gmail.com, qemu-devel@nongnu.org On 11/05/2011 03:37 PM, Thomas Schmitt wrote: > MMC-3 5.2 and MMC-5 6.2.3 state about processing of command BLANK with > Immed bit set to one: > "In response to the REQUEST SENSE command, unless an error has occurred, > the Drive shall return a SK/ASC/ASCQ values set to > NOT READY/LOGICAL UNIT NOT READY/OPERATION IN PROGRESS, > with the sense key specific bytes set for progress indication." > > But libburn gets on qemu > > TEST UNIT READY > 00 00 00 00 00 00 > +++ sense data = 71 00 02 00 00 00 00 0A 00 00 00 00 04 08 00 80 24 8B > +++ key=2 asc=04h ascq=08h ( 0 ms) > > REQUEST SENSE > 03 00 00 00 12 00 > From drive: 18b > f0 00 00 00 00 00 00 0a 00 00 00 00 00 00 00 00 00 00 > 0 ms > > It is ok that TEST UNIT READY reports the sense data with > 2 04 08 LOGICAL UNIT NOT READY, LONG WRITE IN PROGRESS > But it is not ok that REQUEST SENSE does not do the same. > On qemu it reports: > 0 00 00 NO ADDITIONAL SENSE INFORMATION This is because QEMU always emulates REQUEST SENSE and always returns the sense data from the last request. Is this git master or 0.15? For git master, I would have expected REQUEST SENSE to return the correct sense data, but without updating it. In general, it seems safer (and simpler?) if libburn uses TEST UNIT READY and its autosense data to report progress. REQUEST SENSE would be used if SG_IO reports CHECK CONDITION without SG_ERR_DRIVER_SENSE (but modern OSes will always emulate autosense even if the HBA does not support it) and possibly if TEST UNIT READY returns GOOD which is allowed by deprecated in MMC. Paolo