94-188r1 -- Proposed INQUIRY command enhancements (a.k.a. TEST SUPPORT)

Ralph Weber -- VMS -- ZKO3-4/U14 weber at star.enet.dec.com
Wed Oct 19 12:33:55 PDT 1994


                                                                  X3T10/94-188R1

To:         Membership of X3T10

From:       Ralph O. Weber
            Digital Equipment Corporation

Date:       October 19, 1994

Subject:    Proposed INQUIRY command enhancements (a.k.a TEST SUPPORT)


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.  Access to the data is
patterned after the vital product data pages in the INQUIRY command. 
The proposal takes the form of additions to the INQUIRY command.

Revision 1 of this proposal incorporates several comments from Gene
Milligan.  Mostly the changes concern places where my wording simply
was not adequate when measured against Gene's standards. :-)  The most
substantial change is that I restored the ECMA field for version
numbers.  In the printed copy, all changes are marked with change
bars.  I also have left the change bars from the revision 0 draft.

If approved, these additions would appear in the SCSI-3 Primary
Commands standard.  Per direction from the X3T10 general working
group, support for these additions to the INQUIRY command shall be
optional.

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.  Where clause
and table numbers are used, they are taken from SPC revision 3 (dis-
tributed in the September/October X3T10 mailing).

Modify clause 7.5 to read (changes are marked with change bars):

7.5 INQUIRY command

The INQUIRY command (see table 18) requests that information regarding
parameters of the target and its attached peripheral device(s) be sent
to the application client.  Options allow the application client to
request additional information about the target or logical unit (see
7.5.3) and information about SCSI commands supported by the device
server (see 7.5.4).

                           Table 18 - INQUIRY command
+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+=======================================================================|
| 0   |                           Operation code (12h)                        |
|-----+-----------------------------------------------------------------------|
| 1   |                           Reserved                  |  CmdDt |  EVPD  |
|-----+-----------------------------------------------------------------------|
| 2   |                           Page or Operation code                      |
|-----+-----------------------------------------------------------------------|
| 3   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 4   |                           Allocation length                           |
|-----+-----------------------------------------------------------------------|
| 5   |                           Control                                     |
+=============================================================================+

An enable vital product data (EVPD) bit of one specifies that the
device server shall return the optional vital product data specified
by the page code field.  If the target does not support vital product
data and this bit is set to one, the device server shall return CHECK
CONDITION status with the sense key set to ILLEGAL REQUEST and an
additional sense code of INVALID FIELD IN CDB.

A command support data (CmdDt) bit of one specifies that the device
server shall return the optional command support data specified by the
operation code field.  If the device server does not support returning
command data and this bit is set to one, the device server shall
return CHECK CONDITION status with the sense key set to ILLEGAL
REQUEST and an additional sense code of INVALID FIELD IN CDB.  Details
of the command support data can be found in clause 7.5.4.

If both the EVPD and CmdDt bits are zero, the device server shall
return the standard INQUIRY data (see clause 7.5.1).  If the page or
operation code field is not zero when both EVPD and CmdDt are zero,
the device server shall return CHECK CONDITION status with the sense
key set to ILLEGAL REQUEST and an additional sense code of INVALID
FIELD IN CDB.  If both the EVPD and CmdDt bits are one, the device
server shall return CHECK CONDITION status with the sense key set to
ILLEGAL REQUEST and an additional sense code of INVALID FIELD IN CDB.

When the EVPD bit is one, the page or operation code field specifies
which page of vital product data information the device server shall
return (see 8.4).  When the CmdDt bit is one, the page or operation
code field specifies the SCSI operation code for which device server
shall return command support data (see 7.5.4).

The remainder of clause 7.5 needs no changes.

Add the following as clause 7.5.4.

7.5.4 Command support data

Implementation of command support data is optional.  The application
client requests the command support data information by setting the
CmdDt bit to one and specifying the SCSI operation code of the desired
CDB.

If the device server implements the requested SCSI operation code, it
shall return the data shown in table t1.  If the device server does
not implement the requested SCSI operation code it shall return four
zero bytes.  The device server may store its command support data on
the media.  If command support data is unavailable due the media
access considerations, the device server shall return 1 byte
containing 03h (both VSop and StdOp set).

                     Table t1 - command support data format
+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+=====================================================+========+========|
| 0   |                           Reserved                  |  VSop  | StdOp  |
|-----+-----------------------------------------------------------------------|
| 1   |   ISO version   |       ECMA version       |  ANSI-approved version   |
|-----+-----------------------------------------------------------------------|
| 2   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 3   |                           CDB size (m - 3)                            |
|-----+-----------------------------------------------------------------------|
| 4   |                                                                       |
|- - -+- -                        CDB usage bit mask                       - -|
| m   |                                                                       |
+=============================================================================+

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, ECMA 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
7.5.1.)  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 interpretation of the ISO, ECMA and ANSI-approved version fields
by the application client shall vendor-specific.  If the operation
code being tested is not supported, both the StdOP and VSop bits 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 in the return data.

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 INQUIRY command for a device
server that implements command support data but not vital product data
would be: FFh, 02h, FFh, 00h, FFh, 07h.  This example assumes that the
SAM defines uses for only the low-order three bits of the Control
byte.^Z




More information about the T10 mailing list