ide/atapi: Track tray open/close state
We already track it in BlockDriverState since commit 4be9762a. Asdiscussed in that commit's message, we should track it in the devicedevice models instead, because it's device state.
Signed-off-by: Markus Armbruster <armbru@redhat.com>...
scsi-disk: Factor out scsi_disk_emulate_start_stop()
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
scsi-disk: Track tray open/close state
block: Revert entanglement of bdrv_is_inserted() with tray status
Commit 4be9762a changed bdrv_is_inserted() to fail when the tray isopen. Unfortunately, there are two different kinds of users, withconflicting needs.
1. Device models using bdrv_eject(), currently ide-cd and scsi-cd....
ide/atapi: Track tray locked state
We already track it in BlockDriverState. Just like tray open/closestate, we should track it in the device models instead, because it'sdevice state.
scsi-disk: Track tray locked state
ide: Use a table to declare which drive kinds accept each command
No functional change.
It would be nice to have handler functions in the table, like commite1a064f9 did for ATAPI. Left for another day.
ide: Reject ATA commands specific to drive kinds
ACS-2 Table B.2 explicitly prohibits ATAPI devices from implementingWIN_RECAL, WIN_READ_EXT, WIN_READDMA_EXT, WIN_READ_NATIVE_MAX,WIN_MULTREAD_EXT, WIN_WRITE, WIN_WRITE_ONCE, WIN_WRITE_EXT,WIN_WRITEDMA_EXT, WIN_MULTWRITE_EXT, WIN_WRITE_VERIFY, WIN_VERIFY,...
ide/atapi: Clean up misleading name in cmd_start_stop_unit()
"eject" is misleading; it means "eject" when start is clear, but"load" when start is set. Rename to loej, because that's how MMC-5calls it, in section 6.40.
ide: Fix ATA command READ to set ATAPI signature for CD-ROM
Must set the ATAPI device signature, see ATA4 8.27.5.2 Outputs forPACKET Command feature set devices, and ACS-2 7.36.6 Outputs forPACKET feature set devices.
View revisions
Also available in: Atom