• Aucun résultat trouvé

SCSI Bus Phases

Dans le document ae EMULEX (Page 150-157)

10.3

10.3.1

10.3.2

SCSI Bus Phases

The activities on the SCSI bus can be divided into the following phases of operation:

• Arbitration

• Selection

• Re-selection o Command o Data o Status o Message

These phases are supported as specified by the ANSI SCSI specification. The

phas,~s are individually discussed in subsequent subsections. The last four phases (Command, Data, Status, and Message) are grouped together as Information Transfer Phases.

When the SCSI bus is not involved in one of the SCSI bus phases, it is in a Bus Free Phase. The Bus Free Phase indicates that no host adapter or controller is actively using the SCSI bus and the SCSI bus is available for subsequent users.

The SCSI bus activities, implemented by the UC07/08, include the disconnect function and re-selection function (see subsection 10.3.2). Overlapped operations on multiple controllers and multiple logical units are supported.

In the following subsections, no attempt is made to detail the SCSI bus signal sequences; the signals and timing are listed in subsection 9.3.3.

Arbitration Phase

The Arbitration Phase is an optional implementation on the SCSI bus. This phase is used when multiple controllers or processors contend for SCSI bus ownership. Since multiple host adapters and/or controllers might desire control of the SCSI bus concurrently, arbitration for the SCSI bus is a requirement for controllers attached to the UC07/08.

Selection and Re-selection Phases

The SCSI bus Selection and Re-selection phases provide methods for establishing a link between the Initiator and a desired Target.

10-4 SCSI Protocol Description UC0751001-00, Rev H

10.3.3

10.3.3.1

SCSI Bus Phases

After the UC07/08 selects a target to perform some function (for example, read or write data), the target has the option of disconnecting from the SCSI bus.

When the target needs to re-establish the link to its original Initiator, it res elects that Initiator.

The SCSI Selection and Re-selection Phases can be terminated for anyone of three conditions:

1. The preceding Selection or Re-selection Phase is successfully completed by using the Selection/Re-selection handshake protocol.

2. A Selection/Re-selection timeout occurs. The timeout results if any Target or Initiator does not respond to the Selection/Re-selection Phase within a timeout period of two seconds.

3. A Reset (-RST) signal occurs on the SCSI bus. When this signal is

asserted, all SCSI bus sequences are immediately terminated and the SCSI bus signals are released by all Initiators and Targets.

The Initiator uses the Attention (-ATN) signal to notify the target that a message is ready. To guarantee that the Target recognizes the Attention condition before the Command Phase is entered, the -ATN signal level is held true before the Selection or Re-selection Phase is completed.

If an IDENTIFY message is used during the Selection Phase sequence, the specified Logical Unit Number (LUN) has precedence over the LUN field in the Command Descriptor Block (CDB). (CDBs are described in detail in

subsection 10.6.) The IDENTIFY message also informs the Target if the Initiator supports the disconnect function.

Information Transfer Phases

The Command, Data, Status, and Message Phases are grouped together as Information Transfer Phases because they are all used to transfer data or control information via the SCSI data bus. The Information Transfer Phases are described in the following subsections.

Command Phase

The Command Phase allows the Target to request command information from the Initiator. An Initiator issues SCSI commands to a Target by transferring a command packet, called a Command Descriptor Block (CDB). The length of the SCSI command and the meaning of the information in the command packet depends on which command is being transferred. (See subsection 10.6 for definitions of SCSI commands and all SCSI CDBs supported by the UC07/08.)

UC0751 001-00, Rev H SCSI Protocol Description 10-5

SCSI Bus Phases

10.3.3.2

10.3.3.3

The Command Phase is interrupted only for the following exception conditions:

II Reset Condition. This condition can occur when the SCSI Reset (-RST) signal is asserted or a power fail or power-off condition in the Target ,occurs. In this case, the Command Phase and the connection established

during the Selection/Re-s~lection Phase is terminated by the Target with the release of the - BSY sign",l.

• Parity Error Condition. The Target detects a parity error on the SCSI bus during the command transfer operation. At this time, the target controller releases the -BSY signal, terminates the connection, and the SCSI bus returns to the Bus Free phase.

Data Phase

The Data Phase of a connection controls the transfer of data between the Initiator and Target devices. The Data Phase includes both the Data In Phase and the Data Out Phase. The Data In Phase allows the Target to request sending of data to the Initiator from the Target. The Data Out Phase allows the Target to request sending of data to the Target from the Initiator. The direction of the data transfer operation depends on the command being processed.

Some commands might have no data to be transferred and, therefore, have a null Data Phase. Synchronous and asynchronous data transfer mode are supported by the UC07/08.

The Data Phase is interrupted only for the following exception conditions:

• Reset Condition. This condition can occur when the SCSI Reset (-RST) signal is asserted or when a power fail or power-off condition in the Target occurs. In this condition, the Data Phase and the connection established during the Selection/Re-selection Phase are terminated by the Target with the release of the - BSY signal.

• Data Out Parity Error Condition. The Target detects a parity error on the SCSI bus during the data transfer operation from the Initiator to the Target.

• Data In Parity Error Condition. The Initiator detects a parity error on the SCSI bus during the data transfer operation from the Target to the

Initiator. The Initiator can then assert the -ATN signal along with the Acknowledge (-ACK) signal. The Target detects this condition and enters the message out phase to receive a message. The Initiator sends an Initiator-detected error message in response.

Status Phase

The Status Phase is used by the Target to send completion information to the Initiator. The status is sent in a single byte, the format of which is defined in subsection 10.3.3.3.1.

10-6 SCSI Protocol Description UC0751001-"-OO. Rev H

10.3.3.3.1

SCSI Bus Phases

The Target can initiate the Status Phase when anyone of the following conditions occur:

• Busy Status. The Selection Phase is completed and the Target is in a BUSY state and unable to process any commands for an extended period of time. The Target can initiate the Status Phase immediately after this condition occurs. The Status Byte transferred has the BUSY status code set.

• Reservation Conflict Status. The Command or Re-selection Phase is completed and the specified LUN is reserved for another Initiator. The Status Byte transferred has the RESERVATION CONFLICT status code set.

• Terminated Status. At the termination of a command, the Status Byte transferred has the GOOD STATUS code set to indicate the success of the command.

NOTE: In multi-Initiator environments, the Initiator delays a minimum of 200 microseconds before attempting another selection of a Target if a BUSY status code for that Target is received.

Status Byte Format

The format of the Status Byte used by the Target to send completion information to the Initiator is defined below.

Byte Bit 07 06 05 04 03

I

02

I

01

00 0 0 0 Status Code

Status Code - Bits < 04;01 >

00 NED

These bits are used to specify the status code. Table 10-1 lists and describes the status codes that are recognized by the UC07/08.

Nonexistent Deyice (NED) - Bit 00

When the NED bit is set to one, the Initiator selected a LUN that is not configured in the system.

UC0751 001-00, Rev H SCSI Protocol Description 10-7

SCSI Bus Phases

10.3.3.4

Table 10-1. Status Codes

Bits

04 03 02 01 Status Description

X 0 0 0 GOOD STATUS The target controller successfully completed the command.

0 0 0 1 CHECK CONDITION An error, exception, or abnormal con-dition occurred.

0 1 0 0 BUSY The target controller is busy.

1 = Set o = Cleared X = Don't Care

Message Phase

The Message Phase is used to transfer information about exception conditions between the Initiator and the Target. The Message Phase includes both the Message In and the Message Out Phases. The Message In Phase allows a Target to request that messages be sent to the Initiator from the Target. The Message Out Phase allows a Target to request that messages be sent from the Initiator to the Target. Table 10-2 lists the error messages that are supported by the UC07/08. Unsupported messages will cause the UC07/08 to abort and restart the command.

10-8 SCSI Protocol Description

SCSI Bus Phases

Table 10-2. UC07108 SCSI Messages

Code Message Description

00 COMMAND COMPLETE Issued by the Target just before releasing the -BSY signal at the end of a command execution. This message is generally sent immediately after a Status Phase.

01 EXTENDED Used for synchronous Data Transfer

Request.

02 SAVE DATA POINTER Issued by the Target to direct the Initiator to save a copy of the present active data pointer.

03 RESTORE DATA POINTER

04 DISCONNECT Issued by the Target just before releasing the -BSY signal to indicate to the Initiator that the present physical connection is

temporarily broken. The current data, command, and status pointers are not saved.

06 ABORT Issued by the Initiator to the Target

to clear the specified LUN and cause the SCSI bus to go to the Bus Free Phase.

07 MESSAGE REJECT Issued by the Initiator or Target in response to a received message that was undefined.

09 MESSAGE PARITY ERROR

OC BUS DEVICE RESET Issued by the Initiator to the Target to reset all current I/O activities on the SCSI bus.

This message generates a hard Reset Condition (see subsection 10.5.1).

80-FF IDENTIFY * Issued by the Target or Initiator to establish a connection to a particular LUN. The following bits have particular meaning:

Bit 07 - Always set to one.

Bit 06 - Set if the Initiator can support Disconnect and Reconnect sequences.

Bits < 02:00 > -Specify LUN address (hexadecimal) in a Target.

* If the disconnect function is supported, this message will be issued by the UC07/08 at the beginning of every command sequence.

UCO 751 001-00, Rev H SCSI Protocol Description 10-9

SCSI Bus Phase Sequencing

10.4 SCSI Bus Phase Sequencing

The status of the SCSI bus is a function of the control signals. These signals place the bus in one of four phases: Arbitration, Selection/Re-selection, Information Transfer, and Bus Free. The order in which SCSI bus phases are used follows a prescribed sequence, shown in Figure 10-2.

All SCSI command sequences start with the Bus Free Phase. The normal progression is from the Bus Free Phase to the Arbitration Phase. During arbitration, hosts/controllers contest for control of the SCSI bus; priority is given to the one with the highest SCSI bus address.

Once a host or controller has control of the SCSI bus, the bus enters the Selection/Re-selection Phase. This phase allows the master of the bus to select a specific device for communication. An Initiator can select a Target to initiate an operation, or a Target can reselect an Initiator to continue an operation.

After a physical path between an Initiator and a Target is established, the bus moves into one of the Information Transfer Phases. These phases include six types of information exchange:

• Data Out Phase

• Data In Phase

• Command Phase

• Status Phase

• Message In Phase

• Message Out Phase

These types of SCSI bus information exchange are described in more detail in subsection 10.3.

RESET CONDITION

PHASE SEQUENCING WITH ARBITRATION

Figure 10-2. SCSI Bus Phase Sequences

COMMAND OR DATA OR STATUS OR MESSAGE PHASE

UC0701-0590A

1 ()-l ()

srs

J Prntnrnl Dpf:rrintinn

10.5

10.5.1

10.5.2

10.6

SCSI Commands

Dans le document ae EMULEX (Page 150-157)