94-178R0 -- Proposal for TEST SUPPORT command

Ralph Weber -- VMS -- ZKO3-4/U14 weber at star.enet.dec.com
Wed Sep 7 08:51:01 PDT 1994


                                                                  X3T10/94-178R0

To:         Membership of X3T10

From:       Ralph O. Weber
            Digital Equipment Corporation

Date:       September 5, 1994

Subject:    Proposal for TEST SUPPORT command


This document proposes a mechanism by which an application client can
determine what SCSI commands are supported by a device server and what
capabilities within those commands can be used.  This proposal takes
the form of a new command, TEST SUPPORT.  The TEST SUPPORT command
shall be defined in the SCSI-3 Primary Commands standard.  Support for
the TEST SUPPORT command shall be mandatory for all device types.

This proposal is a response to the decision to eliminate the require-
ment that device servers test all reserved fields for zeros.  Said
requirement is present in the SCSI-1 and SCSI-2 standards, but has
been dropped from the SCSI-3 standard, via a X3T10 approved change
to the SCSI-3 Architecture Model.

This proposal has the following advantages:

   +  No need to validate received reserved fields on main-line device
      server code paths,

   +  No mode page bits to manage device server checking/non-checking
      of reserved fields, and

   +  No complex version-to-feature conversion tables (which eliminates
      a significant source of errors in both the application client and
      the device server)

Generally speaking, this proposal is modelled on the changeable
parameters mode pages.

The following text is proposed for inclusion in the SPC.

7.x TEST SUPPORT command

The TEST SUPPORT command (see table t1) is used to determine the
extent of support for a given SCSI operation code.

                         Table t1 - TEST SUPPORT command
+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+=======================================================================|
| 0   |                           Operation code (4Fh)                        |
|-----+-----------------------------------------------------------------------|
| 1   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 2   |                           Test operation code                         |
|-----+-----------------------------------------------------------------------|
| 3   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 4   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 5   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 6   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 7   | (MSB)                                                                 |
|-----+--                         Parameter list length                    ---|
| 8   |                                                                 (LSB) |
|-----+-----------------------------------------------------------------------|
| 9   |                           Control                                     |
+=============================================================================+

The Test operation code field shall contain the operation code for the
SCSI command for which support is being tested.  The device server
shall return parameter data as shown in table t2 describing its
support for the operation code contained in the Test operation code
field.

                       Table t2 - TEST SUPPORT data format
+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+==========================+========+=================+========+========|
| 0   |         Reserved         |  PdSD  |    Reserved     |  VSop  | StdOp  |
|-----+-----------------------------------------------------------------------|
| 1   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 2   |   ISO version   |       ECMA version       |  ANSI-approved version   |
|-----+-----------------------------------------------------------------------|
| 3   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 4   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 5   |                           CDB size (m - 7)                            |
|-----+-----------------------------------------------------------------------|
| 6   |                                                                       |
|-----+---                        Parameter data size (n - m - 7)          ---|
| 7   |                                                                       |
|-----+-----------------------------------------------------------------------|
| 8   |                                                                       |
|- - -+- -                        CDB usage bit mask                       - -|
| m   |                                                                       |
|-----+-----------------------------------------------------------------------|
| m+1 |                                                                       |
|- - -+- -                        Parameter data usage bit mask            - -|
| n   |                                                                       |
+=============================================================================+

If the operation code being tested is supported as defined in a SCSI
standard, the StdOp bit shall be one, the VSop bit shall be zero, and
the ISO version, ECMA version, and ANSI-approved version fields shall
contain standard INQUIRY data naming the standard that defines the
SCSI command.  (Information about standard INQUIRY data can be found
in clause ?.?.?.)  If the operation code being tested is supported in
a vendor-specific way, the StdOp bit shall be zero, the VSop bit shall
be one, and the contents of the ISO version, ECMA version, and ANSI-
approved version fields shall vendor-specific.  If the operation code
being tested is not supported, both the StdOP and VSop bits shall be
zero.

The PdSD bit shall be one when the parameter data used by the command
being tested provides a self-defining mechanism by which the applica-
tion client can determine the parameter data format.  The LOG SELECT
and MODE SELECT commands are examples of commands whose parameter data
provides a self-defining mechanism.  When the PdSD bit is one, the
Parameter data size field shall contain a zero.  When the parameter
data definition does not include a self-defining mechanism, the PdSD
bit shall be zero.

The CDB size field shall contain the number of bytes in the CDB for
the operation code being tested, and the size of the CDB bit mask
field.  If the PdSD bit is zero and the operation code being tested
requires the application client to send command parameter data to the
device server, the Parameter data size field shall contain the number
of bytes in the Parameter data usage bit mask field.  Otherwise, the
Parameter data size field shall contain zero.

The CDB usage bit mask field shall contain a usage map for all the
bits in the CDB for the operation code being tested.  The bits in the
usage map shall have a one-for-one correspondence to an actual CDB for
the operation code being tested.  If the device server evaluates a bit
as all or part of a field in the CDB for the operation code being
tested, the usage map shall contain a one in the corresponding bit
position.  If the device server ignores a bit in the CDB for the
operation code being tested, the usage map shall contain a zero in
the corresponding bit position.

Thus, the CDB usage bit map for the TEST SUPPORT command would be:
FFh, 0, FFh, 0, 0, 0, 0, FFh, FFh, 07h.  This example assumes that the
SAM defines uses for only the low-order three bits of the Control
byte.

When the Parameter data size field is not zero, the Parameter data
usage bit mask field shall contain a usage map for all the bits in
the parameter data for the operation code being tested.  When the
parameter data for the operation code being tested contains repeating
fields or sections, the Parameter data usage bit mask field shall
contain exactly one instance of the repeatable data.

The bits in the usage map shall have a one-for-one correspondence to
the actual parameter data for the operation code being tested.  If the
device server evaluates a bit as all or part of a field in the para-
meter data for the operation code being tested, the usage map shall
contain a one in the corresponding bit position.  If the device server
ignores a bit in the parameter data for the operation code being
tested, the usage map shall contain a zero in the corresponding bit
position.
^Z




More information about the T10 mailing list