On 11/02/2011 10:22 PM, Thomas Schmitt wrote:
Hi,

i wrote:
So how is this altered to 0x12 in the further course of processing ?

Paolo Bonzini wrote:
Because you're using an *IDE* (ATAPI) CD-ROM, not SCSI.  See hw/ide/atapi.c.

You convinced me.
But this does not explain yet the difference in behavior of
both groups of IDE DVD-ROMs. Why are those of -drive if=scsi empty ?

They are not "of -drive if=scsi". They are "of -cdrom", and unlike the SCSI ones they are always present, even if no -cdrom is given (you can use -nodefaults to remove all default devices, including the IDE CD-ROM). So if you specified "-drive if=scsi" *and* "-cdrom", you'd get two non-empty drives.

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).

Why the distinction by transport bus ? Mode page 2Ah is a matter
of the drive alone. MMC is independent of the bus.

It's just an artefact of having two separate implementations for ATAPI and SCSI.

I did not yet find out, why the IDE drive emulation emits a Mode Data
Length of 0x22. With Page Length 0x12 it should have been 0x1a.
8 too many.

Yeah, looks like all the

        case MODE_PAGE_R_W_ERROR: /* error recovery */
            cpu_to_ube16(&buf[0], 16 + 6);

should have "- 2" instead of "+ 6".

Paolo

Reply via email to