• Keine Ergebnisse gefunden

Command Sequencing

Im Dokument Functional Specifications ~ (Seite 64-68)

MOVE READ

SPACE

WRITE

4.5. Command Sequencing

Usually the Initiator must issue a Sequence of SCSI commands to be able to have the Drive perform a certain operation. As a general rule any sequence of SCSI commands are legal. There are, however, a few exceptions.

The tape and buffer system in the Drive can be in one of 4 different nor-mal modes. In addition there are 7 exception modes. The Drive changes normal modes before starting to execute certain commands. the Drive may enter one of the exception modes when a command has failed. The action taken by the Drive when a command is received depends on the current mode. For the discussion of modes the command set is grouped into 5 different command groups according to the command mode speci-fied in section 4.4.

4.5.1. Normal Modes

There are 4 different normal modes. The default mode after power-up or reset is always MOVE. The Drive also enters MOVE mode when a new cartridge is inserted.

The Drive attempts to enter the MOVE mode when a command from the move-group has been received. In this mode the data buffer is not used;

The Drive attempts to enter the READ mode when a command from the read-group has been received. The data.buffer system is set up to trans-fer data and filemarks from the tape to the SCSI bus.

The Drive attempts to enter the SPACE mode when a command from the space-group has been received. The data buffer system is set up to transfer data and filemarks from the tape.

The Drive attempts to enter the WRITE mode when a command from the write-group has been received. The data buffer system is set up to transfer data (WRITE commands) or filemarks (WRITE FILEMARKS commands) from the SCSI bus to the tape.

4-5 SCSI-2 Functional Specifications

I

Current Mode Move

Read

Space

Tandberg Data Commands

The action taken by the Drive when a command is received depends on the current mode. Commands from one group can always follow a com-mand from the same group with no special action ~ken. Note also that neutral-group cOmmands can be inserted into any sequence of com-mands as they do not change the Drive's mode. When a command from one group follows a command from another group the Drive usually takes special action. In a few cases going from one group to another is not allowed. The command from the new group is then not executed at all. Instead it is just terminated with CHECK CONDITION.

The following table shows the actions taken by the Drive when a com-mand from a certain group is received in the different normal modes:

I

Next Command

I

Actions

movellroup No action. The move-group command is executed.

readllroup The buffer system is re-initialized (all buffered data is lost). The Drive then seeks the tape reference burst. The Density Code is updated. The read-group oommand is executed.

space-group The buffer system is re-initialized (all buffered data is lost). The Drive then seeks the tape reference burst. The Density Code is updated. The spacellroup command is executed.

write-group The Drive waits until the cartridge type is known (in case an autoload is in progress). H the cartridge type is suited for the selected tape format (Density Code) the buffer system is re-initialized (all buffered data is lost). The Drive then seeks the tape edge and write the tape reference burst. The Density Code is updated. The write-group command is executed.

movellroup The Drive stops any re-ahead operation. The buffer system Is re-initial-ized (all re-ahead data is lost). The movellroup command is then exe-cuted. See section 4.5.2 for a discussion of exceptions.

read-group No action. The readllroup command is executed.

space-group The Drive just enters SPACE mode. The space-group command is exe-cuted. See section 4.5.2 for a discussion of exceptions;

write-group The Drive will check if the tape is logically positioned at end-of-dsta (Logical End Of Partition). H the tape is at LEOP then the writellroup command is executed. This will append new data after the last writ- ten block on the tape. If the tape is not at LEOP then the writellroup com-mand is terminated immediately with CHECK CONDITION status. The The Error Code is set to E$BTD_ WRRD (Write After Read). The Drive continues to be in READ mode. See section 4.52 for a discussion of exceptions.

movellroup The Drive stops any read-ahead operation. The buffer system is re-initial-ized (all re- ahead data is lost). The movellroup command is then exe-cuted. See section 4.5.2 for a discussion of exceptions.

readllroup The Drive just enters READ mode. The read-group command is exe-cuted. See section 4.5.2 for a discussion of exceptions.

spacellroup No action. The space-group command pis executed.

write-group The Drive will checK if the tape is lo.9ically positioned at end-of-data (Logical End Of Partition). If the tape is at LEOP then the writellroup command Is executed. This will append new data after the last wrlt-ten bloek on the tape. If the tape is not at LEOP then the write-group com-mand is terminated immediately with CHECK CONDITION status. The The Error Code is set to E$BTD_WRRD (Write After Read). The Drive continues to be in SPACE mode. See section 4.5.2 for a discussion of exceptions.

Table: Normal Mode Actions (table to be continued ... )

4-6 SCSI-2 Functional SpecifICations

I

CUrrant Mode

I

Next Command

I

Actions

Write move-group Data and f1lemarks remaining in the data buffer are written to the tape. If this operation Is successful then The Drive enters MOVE mode. The mov. group command is executed. See section 4.5.2 for a discussion Of exceptions.

read-group The Drive terminates the read-group command immediately with CHECK CONDrrlON status. The Error Code is set to E$BTD_RDWR (Reed After Write). The Drive continues to be in WRrrE mode.

space-group If the space-group command is a SPACE forward command then The Drive terminates the command immediately with CHECK CONDrrlON status. The The Error Code is set to either E$TEM_EOR or

ESTEM_EOREW depending on whether the tape is positioned before or after PSEW. The Drive continues to be in WRrrE mode. In other cases The Drive enters SPACE mode and the space-group command Is ex.

cuted. See section 4.5.2 for a discussion of exceptions.

write-group A test is made to see if the current Density Code (tape format) has changed. The write.group command is executed if the tape format has not changed.

Table: Normal Mode Actions

(

'

~'

4-7 SCSI-2 Functional Specifications

READ ERROR

When an exception has occurred in the Drive's Tape Handler. a transi-tion is often made from one of the normal modes (move, read/verify, space and write) to an exception mode. The Drive supports 7 exception modes:

The Drive enters this mode when a fatal error has been detected during execution of a read or space-group command. The following exceptions brings the Drive into this mode:

E$TCM_CFST

The Drive enters this mode when a fatal error has been detected during execution of a write-group command. The following exceptions brings the Drive into this mode:

E$TCM_CRMD

The Drive enters this mode when an uncorrectable block has been de-tected during execution of a read or space-group command. The follow-ing exceptions brfollow-ings the Drive into this mode:

E$BTDJtTRY : Read Retries Exhausted

4-8 SCSI-2 Functional Specifications

(

READ END OF PARTI-nON

Im Dokument Functional Specifications ~ (Seite 64-68)