Commands—introduction
30
Pre-execution checks
NOTE:
In compliance with the SCSI specification, the drive terminates a command with a
CHECK CONDITION
status and sets the sense key to
ILLEGAL REQUEST
when a reserved bit, byte,
field or code is received which is not zero.
Before executing a command, the drive makes a number of checks. They fall into three categories:
•
Checks on the command sent by the host. These ensure that no reserved or fixed fields have
been set to illegal values. They check the syntax of commands, in other words the cross
dependency of fields. For example, the Flag bit must not be set if the Link bit is not set.
•
Checks to ensure that there are no outstanding
UNIT ATTENTION
or
DEFERRED ERROR
events
posted for the host that has sent the command.
•
Checks on media access abilities. These are performed for commands requiring access to
the cartridge. A command is rejected if it attempts to access the cartridge when no
cartridge is present or the cartridge is unloaded.
The checks are described below in alphabetical order. The usual order of execution is Illegal Field,
Fixed Bit, Flag Link, Bad LUN, Reservation, Deferred Error, Unit Attention, Media Access, Media
Write, Diagnostic Status, Humidity, Parameter List.
Bad LUN check
For all commands except
INQUIRY
12h, this checks that the LUN specified by the host is zero. The
LUN is taken from the lowest 5 bits of the host’s
IDENTIFY
message.
•
If no
IDENTIFY
message is supplied, the LUN is taken from the host’s Command Descriptor
Block.
•
If an
IDENTIFY
message
is
supplied, the LUN in the host’s Command Descriptor Block is
ignored
•
If the LUN is unsupported, and the host command is not
REQUEST SENSE
,
CHECK
CONDITION
is reported to the host with a sense key of
ILLEGAL REQUEST
, and additional
sense of 2500h (logical unit not supported).
•
If the LUN is unsupported, and the host command
is
REQUEST SENSE
, the original sense
data is replaced with a sense key of
ILLEGAL REQUEST
, and additional sense of 2500h
(logical unit not supported). This new sense data is returned to the host. Once the
command has completed successfully, the sense data is cleared.
Deferred Error check
A deferred error is generated when a command with immediate report fails after the report has
been returned. The check looks to see if a deferred error exists for the host which sent the
command, in other words, a deferred error for which
CHECK CONDITION
status has not yet been