History | View | Annotate | Download (10.3 kB)
scsi: parse 16-byte tape CDBs
The transfer length for these commands is different from the transferlength of the corresponding disk commands, so parse it specially.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
scsi: add SANITIZE command
scsi: update list of commands
Add more commands and their names, and remove SEEK which is obsolete.Instead, use SET_CAPACITY which is still in SSC.
Tested-by: Thomas Schmitt <scdbackup@gmx.net>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
atapi/scsi: unify definitions for MMC
The definitions in ide/internal.h are duplicates, since ATAPI commandsactually come from SCSI. Use the ones in scsi-defs.h and move themissing ones there. Two exceptions:
- MODE_PAGE_WRITE_PARMS conflicts with the "flexible disk geometry"...
atapi: move GESN definitions to scsi-defs.h
As a complement to the previous patch, move definitions for GET EVENTSTATUS NOTIFICATION from the two functions to scsi-defs.h.
The NCR_* constants are just bit values corresponding to the ENC_*values, with no offsets even, so keep just one copy....
scsi-disk: add stubs for more MMC commands
This patch adds a few stub implementations for MMC commands toscsi-disk, to be filled in later in the series. It also adds toscsi-defs.h constants for commands implemented by ide/atapi.c,when missing.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
scsi: refine constants for READ CAPACITY 16
Rename SERVICE_ACTION_IN to SERVICE_ACTION_IN_16 to distinguishfrom the 12-byte CDB variant, and add a constant for the subcommand.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
scsi: add support for unit attention conditions
Unit attention conditions override any sense data the device alreadyhas. Their signaling and clearing is handled entirely by the SCSIBuscode, and they are completely transparent to the SCSIDevices.
scsi: move handling of REPORT LUNS and invalid LUNs to common code
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
scsi: Remove references to SET_WINDOW
SET_WINDOW command is vendor-specific only.So we shouldn't try to emulate it.
Signed-off-by: Hannes Reinecke <hare@suse.de>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
scsi: Remove REZERO_UNIT emulation
REZERO_UNIT command is obsolete. Remove support for it.
scsi: Sanitize command definitions
Sanitize SCSI command definitions.Add _10 suffix to READ_CAPACITY, WRITE_VERIFY, VERIFY, READ_LONG,WRITE_LONG, and WRITE_SAME.Add new command definitions for LOCATE_10, UNMAP, VARLENGTH_CDB,WRITE_FILEMARKS_16, EXTENDED_COPY, ATA_PASSTHROUGH, ACCESS_CONTROL_IN,...
scsi-disk: Remove 'drive_kind'
Instead of using its own definitions scsi-disk shouldbe using the device type of the parent device.
scsi-disk: support WRITE SAME (16) with unmap bit
Support discards via the WRITE SAME command with the unmap bit set, andtell the initiator about the support for it via the block limit and thenew thin provisioning EVPD pages. Also fix the comment which incorrectly...
scsi: Return SAM status codes
Traditionally, the linux stack is using SCSI status codeswhich are shifted by one as compared to those defined in SAM.A SCSI emulation should naturally return the SAM defined codes,not the linux ones.So to avoid any confusion this patch modifies the existing...
scsi-bus: Add MAINTENANCE_IN and MAINTENANCE_OUT SCSIRequest xfer and mode assignments
This patch updates hw/scsi-bus.c to add MAINTENANCE_IN and MAINTENANCE_OUT case inscsi_req_length() for TYPE_ROM with MMC commands. It also adds the MAINTENANCE_OUTcase in scsi_req_xfer_mode() to set SCSI_XFER_TO_DEV for outgoing write data....
Update to a hopefully more future proof FSF address
See also 8167ee883931cb20c6264fc19d040ce2dc6ceaaa,530e7615ce3c01882e582c84dc6304ab98a3d5c5 andfad6cb1a565bb73f83fc0e2654489457b489e436.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
scsi-disk: restruct emulation: GET_CONFIGURATION
Move GET_CONFIGURATION emulation from scsi_send_command() toscsi_disk_emulate_command().
Also add GET_CONFIGURATION to scsi-defs.h and scsi_command_name().
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>...
scsi-disk: restruct emulation: SERVICE_ACTION_IN
Move SERVICE_ACTION_IN emulation from scsi_send_command() toscsi_disk_emulate_command().
Also add SERVICE_ACTION_IN to scsi-defs.h and scsi_command_name().
scsi-disk: restruct emulation: REPORT_LUNS
Move REPORT_LUNS emulation from scsi_send_command() toscsi_disk_emulate_command().
Also add REPORT_LUNS to scsi-defs.h and scsi_command_name().
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
scsi: add read/write 16 commands.
Add READ_16 + friends to scsi-defs.h, scsi_command_name() and therequest parsing helper functions.
Use them in scsi-disk.c too.
scsi: add scsi-defs.h
Largely based on <scsi/scsi.h> from linux. Added into the tree so wecan use the defines everywhere, not just in scsi-generic.c (which islinux-specific).