All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, scdbackup@gmx.net, kraxel@redhat.com
Subject: Re: [Qemu-devel] [PATCH 2/5] scsi: update list of commands
Date: Fri, 11 Nov 2011 15:08:24 +0100	[thread overview]
Message-ID: <4EBD2C58.9010702@redhat.com> (raw)
In-Reply-To: <1320940872-4940-3-git-send-email-pbonzini@redhat.com>

Am 10.11.2011 17:01, schrieb Paolo Bonzini:
> Add more commands and their names, and remove SEEK(6) which is obsolete.
> Instead, use SET_POSITION which is still in SSC.

SET CAPACITY you mean?

> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  hw/scsi-bus.c  |   25 +++++++++++++++++++------
>  hw/scsi-defs.h |   10 +++++++++-
>  hw/scsi-disk.c |    4 +---
>  3 files changed, 29 insertions(+), 10 deletions(-)
> 
> diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c
> index e3d212f..056946d 100644
> --- a/hw/scsi-bus.c
> +++ b/hw/scsi-bus.c
> @@ -694,7 +694,7 @@ static int scsi_req_length(SCSICommand *cmd, SCSIDevice *dev, uint8_t *buf)
>      case TEST_UNIT_READY:
>      case REWIND:
>      case START_STOP:
> -    case SEEK_6:
> +    case SET_CAPACITY:
>      case WRITE_FILEMARKS:
>      case SPACE:
>      case RESERVE:
> @@ -1053,7 +1053,7 @@ static const char *scsi_command_name(uint8_t cmd)
>          [ REASSIGN_BLOCKS          ] = "REASSIGN_BLOCKS",
>          [ READ_6                   ] = "READ_6",
>          [ WRITE_6                  ] = "WRITE_6",
> -        [ SEEK_6                   ] = "SEEK_6",
> +        [ SET_CAPACITY             ] = "SET_CAPACITY",
>          [ READ_REVERSE             ] = "READ_REVERSE",
>          [ WRITE_FILEMARKS          ] = "WRITE_FILEMARKS",
>          [ SPACE                    ] = "SPACE",
> @@ -1081,7 +1081,7 @@ static const char *scsi_command_name(uint8_t cmd)
>          [ SEARCH_EQUAL             ] = "SEARCH_EQUAL",
>          [ SEARCH_LOW               ] = "SEARCH_LOW",
>          [ SET_LIMITS               ] = "SET_LIMITS",
> -        [ PRE_FETCH                ] = "PRE_FETCH",
> +        [ PRE_FETCH                ] = "PRE_FETCH/READ_POSITION",
>          /* READ_POSITION and PRE_FETCH use the same operation code */
>          [ SYNCHRONIZE_CACHE        ] = "SYNCHRONIZE_CACHE",
>          [ LOCK_UNLOCK_CACHE        ] = "LOCK_UNLOCK_CACHE",
> @@ -1118,9 +1118,11 @@ static const char *scsi_command_name(uint8_t cmd)
>          [ WRITE_16                 ] = "WRITE_16",
>          [ WRITE_VERIFY_16          ] = "WRITE_VERIFY_16",
>          [ VERIFY_16                ] = "VERIFY_16",
> -        [ SYNCHRONIZE_CACHE_16     ] = "SYNCHRONIZE_CACHE_16",
> +        [ PRE_FETCH_16             ] = "PRE_FETCH_16",
> +        [ SYNCHRONIZE_CACHE_16     ] = "SPACE_16/SYNCHRONIZE_CACHE_16",
> +        /* SPACE_16 and SYNCHRONIZE_CACHE_16 use the same operation code */
>          [ LOCATE_16                ] = "LOCATE_16",
> -        [ WRITE_SAME_16            ] = "WRITE_SAME_16",
> +        [ WRITE_SAME_16            ] = "ERASE_16/WRITE_SAME_16",
>          /* ERASE_16 and WRITE_SAME_16 use the same operation code */
>          [ SERVICE_ACTION_IN_16     ] = "SERVICE_ACTION_IN_16",
>          [ WRITE_LONG_16            ] = "WRITE_LONG_16",
> @@ -1130,6 +1132,8 @@ static const char *scsi_command_name(uint8_t cmd)
>          [ LOAD_UNLOAD              ] = "LOAD_UNLOAD",
>          [ READ_12                  ] = "READ_12",
>          [ WRITE_12                 ] = "WRITE_12",
> +        [ ERASE_12                 ] = "ERASE_12/GET_PERFORMANCE",
> +        /* ERASE_12 and GET_PERFORMANCE use the same operation code */
>          [ SERVICE_ACTION_IN_12     ] = "SERVICE_ACTION_IN_12",
>          [ WRITE_VERIFY_12          ] = "WRITE_VERIFY_12",
>          [ VERIFY_12                ] = "VERIFY_12",
> @@ -1137,9 +1141,18 @@ static const char *scsi_command_name(uint8_t cmd)
>          [ SEARCH_EQUAL_12          ] = "SEARCH_EQUAL_12",
>          [ SEARCH_LOW_12            ] = "SEARCH_LOW_12",
>          [ READ_ELEMENT_STATUS      ] = "READ_ELEMENT_STATUS",
> -        [ SEND_VOLUME_TAG          ] = "SEND_VOLUME_TAG",
> +        [ SYNCHRONIZE_CACHE_16     ] = "SYNCHRONIZE_CACHE_16/SET_CAPACITY",
> +        /* SYNCHRONIZE_CACHE_16 and SET_CAPACITY use the same operation code */
> +        [ SEND_VOLUME_TAG          ] = "SEND_VOLUME_TAG/SET_STREAMING",
> +        /* SEND_VOLUME_TAG and SET_STREAMING use the same operation code */
>          [ READ_DEFECT_DATA_12      ] = "READ_DEFECT_DATA_12",
>          [ SET_CD_SPEED             ] = "SET_CD_SPEED",
> +        [ SET_READ_AHEAD           ] = "SET_READ_AHEAD",
> +        [ SEND_CUE_SHEET           ] = "SEND_CUE_SHEET",
> +        [ SEND_DVD_STRUCTURE       ] = "SEND_DVD_STRUCTURE",
> +        [ READ_DVD_STRUCTURE       ] = "READ_DVD_STRUCTURE",
> +        [ MECHANISM_STATUS         ] = "MECHANISM_STATUS",
> +        [ READ_CD                  ] = "READ_CD",
>      };
>  
>      if (cmd >= ARRAY_SIZE(names) || names[cmd] == NULL)
> diff --git a/hw/scsi-defs.h b/hw/scsi-defs.h
> index 916b888..aa7a1ab 100644
> --- a/hw/scsi-defs.h
> +++ b/hw/scsi-defs.h
> @@ -32,7 +32,7 @@
>  #define REASSIGN_BLOCKS       0x07
>  #define READ_6                0x08
>  #define WRITE_6               0x0a
> -#define SEEK_6                0x0b
> +#define SET_CAPACITY          0x0b
>  #define READ_REVERSE          0x0f
>  #define WRITE_FILEMARKS       0x10
>  #define SPACE                 0x11
> @@ -81,6 +81,7 @@
>  #define GET_EVENT_STATUS_NOTIFICATION 0x4a
>  #define LOG_SELECT            0x4c
>  #define LOG_SENSE             0x4d
> +#define RESERVE_TRACK         0x53
>  #define MODE_SELECT_10        0x55
>  #define RESERVE_10            0x56
>  #define RELEASE_10            0x57
> @@ -89,6 +90,7 @@
>  #define PERSISTENT_RESERVE_OUT 0x5f
>  #define VARLENGTH_CDB         0x7f
>  #define WRITE_FILEMARKS_16    0x80
> +#define ALLOW_OVERWRITE       0x82
>  #define EXTENDED_COPY         0x83
>  #define ATA_PASSTHROUGH       0x85
>  #define ACCESS_CONTROL_IN     0x86
> @@ -98,6 +100,8 @@
>  #define WRITE_16              0x8a
>  #define WRITE_VERIFY_16       0x8e
>  #define VERIFY_16             0x8f
> +#define PRE_FETCH_16          0x90
> +#define SPACE_16              0x91
>  #define SYNCHRONIZE_CACHE_16  0x91
>  #define LOCATE_16             0x92
>  #define WRITE_SAME_16         0x93
> @@ -110,12 +114,15 @@
>  #define MAINTENANCE_OUT       0xa4
>  #define MOVE_MEDIUM           0xa5
>  #define LOAD_UNLOAD           0xa6
> +#define SET_READ_AHEAD        0xa7
>  #define READ_12               0xa8
>  #define WRITE_12              0xaa
>  #define SERVICE_ACTION_IN_12  0xab
> +#define ERASE_12              0xac
>  #define READ_DVD_STRUCTURE    0xad
>  #define WRITE_VERIFY_12       0xae
>  #define VERIFY_12             0xaf
> +#define SEND_CUE_SHEET        0x5d

Please keep the list sorted, this should go between MODE_SENSE_10 and
PERSISTENT_RESERVE_IN.

Kevin

  reply	other threads:[~2011-11-11 14:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-10 16:01 [Qemu-devel] [PATCH 0/5] scsi/atapi: MMC fixes Paolo Bonzini
2011-11-10 16:01 ` [Qemu-devel] [PATCH 1/5] atapi: kill MODE SENSE(6), fix MODE SENSE(10) Paolo Bonzini
2011-11-11 13:36   ` Kevin Wolf
2011-11-11 13:38     ` Paolo Bonzini
2011-11-11 15:14       ` [Qemu-devel] " Thomas Schmitt
2011-11-10 16:01 ` [Qemu-devel] [PATCH 2/5] scsi: update list of commands Paolo Bonzini
2011-11-11 14:08   ` Kevin Wolf [this message]
2011-11-10 16:01 ` [Qemu-devel] [PATCH 3/5] scsi: fix parsing of allocation length field Paolo Bonzini
2011-11-10 16:01 ` [Qemu-devel] [PATCH 4/5] scsi: remove block descriptors from CDs Paolo Bonzini
2011-11-10 16:01 ` [Qemu-devel] [PATCH 5/5] scsi-block: special case CD burning commands Paolo Bonzini
2011-11-10 18:17 ` [Qemu-devel] [PATCH 0/5] scsi/atapi: MMC fixes Thomas Schmitt
2011-11-11 12:08   ` Paolo Bonzini
2011-11-11 14:47     ` Thomas Schmitt
2011-11-11  4:09 ` Zhi Yong Wu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EBD2C58.9010702@redhat.com \
    --to=kwolf@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=scdbackup@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.