• Aucun résultat trouvé

READ SUFFER (3CH)

Dans le document 88780 SCSI INTERFACE SPECIFICATION (Page 84-91)

Read Buffer

Byte 7

I

6

I

5 4

I

3

I

2 1

I

0

0 Operation Code (3CH)

1 Logical Unit Number Reserved Mode (0)

2 Buffer ID (0)

3-5 Buffer Offset (0) (Byte 3 is the MSB, Byte 5 is the LSB) 6-8 Allocation Length (Byte 6 is the MSB, ByteS is the LSB)

9 Unused

I

Reserved Flag

I

Link

The READ BUFFER command is used in conjunction with the WRITE BUFFER command as a diagnostic function for testing target memory and the SCSI bus integrity. This command

"will not alter the tape.

The mode field must be zero, indicating a combined header and data format. In this mode, a four-byte header followed by data bytes are returned to the initiator during the DATA IN phase. The buffer ID and the buffer offset are reserved. The allocation length specifies the maximum number of bytes that the initiator has allocated for returned header and data. An allocation length of zero indicates that no header or data will be transferred. Any other value indicates the maximum number of bytes that will be transferred. The target terminates the DATA IN phase when allocation length bytes of header plus data have been transferred or ,when all available header and data have been transferred to the initiator, whichever is less.

!The four-byte READ DUFFER header is followed bydata bytes from the target's data buffer.

Command Specification

...as

READ BUFFER Header

Dyte 7

I

6

I

5

I

4

I

3

I

2

I

1

I

0

0 Reserved

1-3 Available Length (OOFFFCH) (Byte 1 is the MSB, Byte 3 is the LSB)

The available length specifies the total number of data bytes that are available in the target's data buffer. This number is not reduced to reflect the allocation length nor is it reduced to reflect the actual number of bytes written using the ~TE BUFFER command. Following the READ BUFFER header, the target will transfer datafrom its data buffer. The number of data bytes transferred following the READ BUFFER header will be the lesser of allocation length minus four or available length.

A READ BUFFER command may return the following sense keys on a check condition:

MEDIUM E·RROR: A previously acknowledged write type of operation experienced an error probably related to the condition of the tape, or the cleanliness of the head. The Valid bit ..

will be set, indicating that the information bytes contain residue information, and the Error Code will be a one indicating a deferred error (if this is supported).

HARDWARE ERROR: Either a previously acknowledged write type of operation had a major non-tape related failure or the current write buffer itself experienced the failure. The Valid bit will be set, and the information field will contain the appropriate residue.

ILLEGAL REQUEST: If a reserved or unused bit is set, an illegal request will be returned.

UNIT ATTENTION: If a fr()nt p'ailel reset,bus reset, or power fail occurred during the _command, ~)JNrr ATIE~{'rI0N.:will be preSent~ ... .... .

A#'ORh:D~bbiihli~b: H;n&~iQor i~;~pr;p~i~~e m~~sa~e was

received during the

": ' .. ~. ~ operation~ the oRer~tio~ wiU-~.be"'termiit&ted .. ill· ~ri iridetermtnate state and ABORTED

:~.-: '.- "COMMAND -will~be 'return~2~ ~::-:---._ -:' ~ ~<':C..' - ...

. :. - _ -" - -.::- ","' __ --:_..i .~: ~.__ .-.: --" ~. :.: .~ ~ .

.. . ---- .-~ -. .

-

. .: ':-;' ::---.. - .... :;-.-...

4-70 Command Specification

COpy (18H)

Copy

Dyte 1

I

6

I

5

.. I

3

I

2

I

1

0 Operation Code (1811)

1 Logical Unit Number Reserved

2-4 Parameter List Length (Byte 2 is the MSB, Byte 4 is the LSB) 5 Vendor Unique

I

Reserved

I

Flag

Introduction

This section discusses the operation and features of the SCSI COPY command. SCSI commands are shown in BOLD text.

0

Pad

Link

The purpose of this section is to provide the user integrating the COPY command on a host system with the 88780 as the Copy Manager with a working knowledge of the supported copy functions, as well as a reference of the 88780's error handling and error reporting. The ANSI document X3T9.2/86-109 is the design center for the 88780 implementation of the COPY command. This standard indicates the function to be performed by the command without specifying the implementation method. Quoting the Standard, "The COPY command ...

provides a means to copy data from one logical unit to another or the same logical unit." The ANSI standard discusses five types of copy functions:

• Sequential Access Devices to Direct Access Devices

• Direct Access Devices to Sequential Access Devices

• Direct Access Devices to Direct Access Devices

• Sequential Access Devices to Sequential Access Devices

• Image Copy

Hereafter, the terms "disk" or "disk drive" will be understood to refer to a Direct Access Device, and the terms "tape" or "tape drive" will be understood to refer to a Sequential Access Device.

Command SpeCification 4·71

Commands Used During Copy

The COPY command for the HP 88i80 will be implemented for Direct Access devices

supporting the document known as Common Command Set (CCS) Revision 4B. It will also be implemented for Sequential Access devices supporting the ANSI document X3.131-1986. The commands used by the Copy Manager are shown below, and the command block descriptions for each command are included at the end of this section.

TARGET Copy Manager All Devices

Direct Access

Sequential Access

COMMAND COPY command (Opcode ISH) (as a target)

INQUIRY command (Opcode 12H) - To verify device type of the target.

REQUEST SENSE command (Opcode 03H) - In order to pass target's sense bytes back to the Copy Host.

READ CAPACITY command (Opcode 25H) - To verify block size compatibility.

READ command (Opcode 28H) - To read a given number of blocks from a disk drive.

WRITE command (Opcode 2AH) - To write a given number of blocks on a disk drive.

MODE SENSE command (Opcode IAH) - To verify device's reported block size with size given in copy_ Segment. - .

, . - . - ,

READ command (Opcode 08H) - To read a given number of blocks or _ data bytes from a tape drive. WRITE command (Opcqde~OAH)- To . write a given number of blocks or data by~eson a t~J)edriv~ ..

4-72 Command Specification

,----..

-:"_- : _ • • ,7" _ - _

• Supported Fields in the Copy Command

Copy Command Block

• Within the command block itself, the HP 88780 supports all fields and bits with the exception of the PAD bit. It is the job of the Copy Host to configure the source and destination devices

· so that the padding function i$ not' necessary. If the PAD bit is set, the Copy Operation is

· terminated with a Check Condition/Dlegal Request status. For operation recommendations, refer to the block mode discussion in "Front Panel/Mode Select Configurations" later in this section.

Parameter List

, \Vithin the parameter list, the Copy Manager supports copying from a disk to the 88780 . and from the 88780 to a disk. The copy function codes for these capabilities are 0 and 1

respectively. As implied above, the 88780 will not support what is known as "Third Party"

copies where neither logical unit is atta.ched to the 88780. It also does not support tape to tape copies. This obviously precludes controlling Direct Access to Direct Access copies, which is copy function code 2. The Image Copy, copy function code 4, is also not supported due to its redundancy and ambiguous definition. The priority field may be set to any value, but will have no effect on the transaction. There are no vendor unique functions at this time, so the vendor unique field may be any value.

Segment Descriptors

Within each segment descriptor, having the CAT bit set is not allowed (see handling of the PAD bit above). For accesses to an 88780,.the LUN field must be set to zero. The block length will depend on the drives involved. However, the tape "block lengths given in the segment descriptor must meet two criteria.

The block length specified within the segment descriptor must equal the block length returned . by a MODE SENSE command to the 88780, which will be compared internally. .

~~

Given that criterion 1 has been met, the block lengths of the source and destination devices will be checked for compatibility. For a more detailed description of this, refer to

"Operation ~ later in this section.

Integration

It is the system integrator's responsibility to verify operation of the COPY command on their system and with the disk and tape drives they are using. Hewlett-Packard has verified correct operation of the 88780 tape drive with the following Hewlett-Packard equipment during the development cycle of the HP 88780 Copy Function:

7936/3;S 8-inch SCSI Disk Drive 9753XS 5 1/4-inch SCSI Disk Drive

97504 3 1/2-inch SCSI Disk Drive and Controller

Command Specification 4-73

Front Panel/Mode Select Configurations

The HP 88780 can be configured prior to a COPY command in any way that is allowable in a normal read/write operation. This includes reading or writing in both Variable and Fixed Block modes, as well as such front panel configurations as setting the Bus Inactivity Limit, the Gap Size, etc. Specific recommendations for settings are described below.

Front panel configurations 40 through 79 may be set as the Copy Host prefers, with the exception of configuration 50 (enable Immediate Response mode) which should be On for performance reasons. Immediate Response may also be enabled through byte 3, bit 4 of the Mode Select Command. Refer to the HP 88780 USER'S GUIDE for a full description of the configurations.

Configuration 81 allows the user to select a block length for the 88780 including variable mode and fixed block lengths of 8, 256,512, 1K, 4K, 16K, 32K, 128K, and 256K bytes. The block length is also selectable using bytes 10 through 12 of the Mode Select Command (prior to the execution of the COpy command). It should be set as follows:

Source Device Type Refer to the Operation section for further details on block compatibility.

Configurations 82~nus Inacth-ity Time, 83-Disconnect Time Limit, and .84-Disconnect Length relatelto clisc.onnection when the.88780 is the Target. As such, they affect the relationship

~i betwh ilie~~opiHost and the C~py Manager, but not·the interactions between the·Copy . :~ : = -- Man~t and the Copy Target. ~ . -

-... ;,..:.. _ ~ _~ . ~ -. -J: ._~. ~~". ." :" . : : . ~ , ' . . . ."' - _ --..

~=:-:. :-;.-~_

.

All otl~erconfigurations are at the preference -of the customer,

.':~"7~-"." -.-.. :~ _ .~~: '.;~<. . •.. ~- "."" --". '.' . .' ." -' . . '. . .

~~':":..-: .-. --~ ;-. ..:.

Operation:

Host Recommendations And Requirements

Tbe Copy Host must allow DISCONNECTS, If the Copy Manager is not allowed to disconnect a Check Condition/megal Request status will be sent,

The Copy Host should configure the source and destination devices (if necessary) before-the Copy Operation is· initiated,

The Copy Host should verify the operable state of the source and destination devices before initiating the COpy command.

The Copy Host should reser\'e any lequential access devices involved in the Copy transaction to prevent other initiators from attempting to alter tape position during the command, The Copy Host should not mix READs and WRITEs to the same sequential access device during a single COPY command. Although this is not prohibited, it may result in strange tape drive operation,

4·74 Command Specification

Copy-Host Arbitration And Selection

The Copy Host will arbitrate and select the Copy Manager. The hos. will issue the COpy command which will be validated by the Copy Manager. If valid, the Copy Manager will take in at most 86 segments of the command and disconnect from the bus. If more segments are available, the drive will r~se1ect to a Data Out phase after processing the last of the previous set of segments.

Segment Yalidation

Validation of a segment means the segment descriptor passes three criteria. The first is that none of the reserved or cat bits are set. Secondly, the source and destination ids and LUN's must match the device type as indicated in the copy function code in the parameter header.

Thirdly, the block lengths between the two devices must be compatible. See description below for an explanation of block compatibility.

Each segment is parsed and analyzed priotto its immediate execution. Ail invalid segment is therefore not recognized until it is about to be performed. If the ~egment appears to be correct, the Copy Manager must determine if the correct type of device is resident at the

i:j indicated ID and LUN, and if the block sizes of the devices are compatible. If the ID and LUN have not changed since the previous segment, no action needs to be taken and the operation continues to the read or write. Otherwise, the following commands take place. Any byte or block length that does not validate will cause the Copy process to terminate with an megal Request sense.

The Copy Manager will arbitrate on the bus and select the device, indicated in the segment, which is not attached to the Copy Manager. This may be either the source or the destination device. Once select~d, the Copy Manager will issue a TEST UNIT READY command and,if

"necessary, clear out the Unit Attention with a REQUEST SENSE. It will then return CHECK CONDITION status to the host with a sense key of COPY ABORTED. If the sense is not a Unit Attention, the Copy process terminates with COpy ABORTED and returns the target's sense. If there is no error, the Copy process continues with an INQUIRY command to verify :. that the peripheral device type matches the Copy segment.

If tIte selected target is the correct type, the Copy Manager will issue a READ CAPACITY command to compare the block sizes and determine if source/destination block sizes are.

compatible.

If the block lengths of the devices are not compatible, no padding or catenating of data will be attempted. Instead, the COpy command will halt and a CHECK CONDITION will be returned to the Copy Host. The possible conditions are shown below.

Block Compatibility Interpretation. Since the COpy command is vague in its definition of "what the block length for the participating tape drive means in disk-tape transactions, the following definition is imposed. There are two variations of the copy process that the 88780 can perform with its copy target. The first is a disk to tape or tape to disk transfer with the tape drive in fixed-mode. The second variation includes disk to tape and tape to disk transfers with the tape drive in variabl~mode. The fixed-mode transfers are defined in the table below. The next paragraph describes the operation of the 88780 when in variable-mode.

Command Specification 4-75

Copy Transfers With Direct Access Devices In Yariable-Mode. The block length of the segment descriptor when the 88780 is in variable-mode is understood to be the "recommended'" block length to be written to or read from tape. If the block length in the segment descriptor is zero, then the recommended block length becomes that of the participating disk drive as reported in the Read Ca.pacity data. If the block length in the segment descriptor is non-zero, block length must pass a compatibility check. For blocks to be compatible, they must be integer multiples of each other. For example, if the disk block length is 512 bytes, acceptable block lengths for the 88780 in the segment descriptor would be 256 bytes, 512 bytes, 1024 • bytes, and so on. Obviously, in the interest of backup performance, a larger block length for the 88780 in the segment would be preferred. "

There exists the possibility that the number of disk blocks to be transferred is not enough to exactly fill the last tape block of the transfer. In this case, the last tape block length will be "

equal to the number of disk blocks remaining to be transferred multiplied by the disk block length. For example, for a segment descriptor specifying that 5 (512 byte) disk blocks are to"

be transferred with the tape block length set at 1024 bytes, the blocks written to or read from the 88780 will be one IK block fonowed by one 512 byte block.

Copy Transfers·With Direct Access Devices In Fixed-Mode. If the 88780 is in fixed-mode, the ..

block length in the segment descriptor must equal the fixed-mode block length of the 88780. If . they are not equal, the Copy process will fail with an Dlegal Request. Once this requirement

has been met, a compatibility check will be made that verifies that the block lengths for the 88780 and the participating disk drive are integer multiples.

Since the 88780is in fixed-mode, it cannot read or write partial blocks on the tape, and therefore a further requirement is necessary if the source device's block length is less than the destination device's block length. For such cases, the number of disk blocks to be transferred must be an integer muliiple of the number c~mputed ~y dividing; the larger :hlock "length by

the smaller block length. Forexample,~he·following seen"ariowo~ldbe\iali¢\.:o.","O " , 0 -0 ~~"C ° _

..

~.

. -- --.---. -." -.

'~.;:"f'- ~

. .

~-=:-. "! - ; . : ••. - : : . . . ::~.::t~_~.~

..

_~.:~~.;: ·~·-~·~·:·zl~:.~. -... :~~;i.~~

I D$inati?,n =~KI~i;_L;:n~'ll g~~~-F~rt-~ ... ~Z ~~ ... : -_,' ••.. , '.", ...

Number of blocks = 4

Dans le document 88780 SCSI INTERFACE SPECIFICATION (Page 84-91)

Documents relatifs