Browse Prior Art Database

Table Verification of Command And Parameter Data Bytes

IP.com Disclosure Number: IPCOM000101793D
Original Publication Date: 1990-Sep-01
Included in the Prior Art Database: 2005-Mar-16
Document File: 3 page(s) / 100K

Publishing Venue

IBM

Related People

Lautenschlager, DA: AUTHOR

Abstract

Described is a method of using tables to perform the checking necessary to confirm the validity of command and/or parameter data bytes.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Table Verification of Command And Parameter Data Bytes

       Described is a method of using tables to perform the
checking necessary to confirm the validity of command and/or
parameter data bytes.

      This method uses a table for each set of Command or Parameter
bytes to be verified.  This description is based on the SCSI Mode
Select command but can be used on a wide variety of applications.

      In SCSI, once a byte is determined to be in error, a byte
number must be returned in the sense data indicating which byte field
is in error.  If this byte is in a multiple byte field, the byte
number indicated in sense may not be the byte in error.  Also in some
cases, the bit within the byte that is in error must be indicated,
and the bit may be part of a multiple bit field so that the bit
in error is not the one returned as bad.  A sample Mode Select
Parameter Page is shown in Fig. 1.

      If any of the bytes or bits are invalid, sense data returned is
based on the table shown in Fig. 2.

      This simple example illustrates that if there are multiple byte
or multiple bit fields with many possible values, this type of
validation can turn into complex code.

      A solution to this is based on using a single routine along
with a number of tables to check the bytes and determine what sense
to return if a byte is invalid.

      The table(s) used for validating the bytes are constructed as
shown in Fig. 3.

      Step/Bytes Byte - The first nibble is the number of bytes
checked by this table.  If all bytes are valid, this is added to the
total number of bytes checked successfully. The second nibble is the
number of steps in this table.

      AND/OR Flag Byte - Each bit in this byte corresponds to a step
in the table.  Zero (0) indicates to AND the Byte Mask with the byte
being tested.  One (1) indicates to Exclusive OR the Byte Mask with
the byte being tested.

      Error Code Byte - This is an optional byte, it is used if two
different errors can be returned.  Like the AND/OR Byte, one error is
returned if the bit is 0, the other if the bit is 1.

      NOTE:  This exampl...