qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 0/5] scsi/atapi: MMC fixes


From: Thomas Schmitt
Subject: [Qemu-devel] [PATCH 0/5] scsi/atapi: MMC fixes
Date: Thu, 10 Nov 2011 19:17:26 +0100

Hi,

> I only tested CD-RW DAO burning of an ISO image, plus invoking a bunch
> of commands from Thomas's logs).  The burning succeeded but reading
> the resulting medium failed consistently at 26 MB.  However, the same
> happened even when doing CD passthrough via virtio, so it may be due to
> a different bug.

Did you get a sense code from the failure ?

My best guess would be that you announced 26 MB by the SEND CUE SHEET
command.
Proposals for inspection of CD medium structure on real Linux:

  wodim -v dev=/dev/sr0 -toc
  cdrecord -v dev=/dev/sr0 -minfo
  cdrskin -v dev=/dev/sr0 -minfo
  xorriso -outdev /dev/sr0 -toc

SCSI command logs are available by -V resp. -scsi_log on.


> Also detect blanking of a disc and reset the maximum LBA. It's possible
> that more special casing is necessary, e.g. for track-at-once, since
> those do not start with blanking.

I did not explore GET EVENT STATUS NOTIFICATION yet, which might
address this issue.

Some scenarios:

Writing CD TAO or Packet, Incremental Streaming on DVD-R[W], or writing
on DVD+R and BD-R without RESERVE TRACK, will cause the new readable
size to be determined only after CLOSE TRACK SESSION.
SEND CUE SHEET resp. RESERVE TRACK determine the size before writing
begins.

DVD-RAM and BD-RE can change their formatted size by FORMAT UNIT.
In this case, the new size is determined as soon as TEST UNIT READY
resp. REQUEST SENSE deliver no sense data any more.
If the Immed Bit in the Format List Header of FORMAT UNIT is not set,
then the size is already determined when FORMAT UNIT returns.

I never worked with formatted CD-RW. But i assume that FORMAT UNIT
has a similar effect on size as with DVD-RAM.

DVD+RW and formatted DVD-RW can grow their formatted size during
writing. This is started by FORMAT UNIT but the size is decided only
when writing ends. This end is not unambigously to detect. One may
at any time continue writing as long as the medium is in the tray.


> The FORMAT
> UNIT command is still somewhat broken for block devices because its
> parameter list length is not in the CDB.  However it works for CD/DVD
> drives, which mandate the length of the payload.

Ouch.
One will have to distinguish the interpretation by Peripheral Qualifier
and Peripheral Device Type from INQUIRE (SSC = 0x02, MMC = 0x05).


> [PATCH 4/5] scsi: remove block descriptors from CDs

It was a good stumble stone for my own code.


Have a nice day :)

Thomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]