Update of SFF-8067 enclosure services on 40-pin SCA FC drive

Bob Snively bob.snively at Eng.Sun.COM
Tue Dec 24 09:55:27 PST 1996


* From the SCSI Reflector (scsi at symbios.com), posted by:
* bob.snively at Eng.Sun.COM (Bob Snively)
*
----------
X-Sun-Data-Type: text
X-Sun-Data-Description: text
X-Sun-Data-Name: text
X-Sun-Charset: us-ascii
X-Sun-Content-Lines: 17


The enclosure is an update of the technical content pages of 
SFF-8067 to reflect revision 8 (the final pre-public review draft) of
SES.  Changes are described in the header.  Changes are minor and
most are involved with correcting the relationship between the SES
page structure and the enclosure services transfer performed by
the disk drive.


-------------------------------------------------------------------------------

Bob Snively				         Phone:	   (415) 786-6694
Sun Microsystems Computer Company	         FAX:	   (415) 568-9603
Mail Stop UMPK 12-204
2550 Garcia Avenue			   	 E-mail:   bob.snively at sun.com
Mountain View, CA 94043-1100
-------------------------------------------------------------------------------
----------
X-Sun-Data-Type: default
X-Sun-Data-Name: sff8067-122396.txt
X-Sun-Charset: us-ascii
X-Sun-Content-Lines: 1096

							December 23, 1996

		SFF-8067, Technical Content Pages


CHANGE CONTROL:


Dated:  01/26/96

1)	Initial draft of 8067 

	This proposed draft is extracted from the work of Jim Espy of
	CLARiiON and Radek Aster of Silicon Graphics.  It was originally
	published as a formal proposal to the SFF committee as a document
	entitled FC_AL STORAGE ENCLOSURE ENVIRONMENTAL SERVICES 
	INTERFACE ENHANCEMENT, revision 1.1, dated 1/3/96.

Dated:  02/02/96

1)	Clarified discovery process and added flow charts, section 6.4.2.1

2)	Clarified -PARALLEL ESI signal pull-up value, section 6.4.1.1

Dated: 	12/23/96

1)	References to SFF-8065 deleted, since the project was cancelled.
	sections 3.0, 5.0, 6.2, and 6.3.

2)	The references to SES replace the references for SPC where appropriate.
	The revision level for SPC is updated.  The changes appear in 
	clause "n" (references) and clauses 7.1, 
	This also removes the editor's note in section 7.1.

3)	The list of pages is augmented to include those specified
	and reserved by SES.  The changes appear in table 7.1 and
	clauses 7.1, 7.2, 7.3, and 7.4.

4)	ESI is changed to "enclosure services" or SES where appropriate.

5)	Page code checking is simplified.  The changes appear in clauses
	7.3, and 7.4.
	
6)	One reason for forcing an ASC/ASCQ of Enclosure Transfer Refused is
	an invalid command to field to the enclosure processor.  This is
	described in 7.3.

7)	ASC/ASCQ values filled in in table 7.5, section 7.5

-------------------   BEGINNING OF TEXT   ----------------------------------

3.  General Description

This SFF Specification provides a mechanism for a Fibre Channel SCA-2
SCSI device as described in SFF-8045 to transfer information 
to and from an enclosure processor using the standard SCSI command
set for the SCSI SES device type.  The information is transmitted across the
signal pins used to provide the loop identifier to the SCSI device.
The protocol is designed to be implemented with simple direct access
to the signals using the SCSI device's microprocessor.  This document
describes both the physical layer signaling for the enclosure
services information and the transport layer protocol for moving
data through the device and formatting the data within a SCSI SES page.

The  protocol is able to determine whether the enclosure provides
only the SEL_n signals as defined by SFF-8045, provides the
SEL_n and Parallel ESI signals as optionally allowed by SFF-8045, or
provides the SEL_n and Enclosure Services Interface as described by
SFF-8067.

Basic communication protocols are defined to allow the presentation
of basic enclosure services status by simple enclosures.  More extensive
communication protocols are defined to allow the transmission of
the complete enclosure service interface data formats as described by
the SCSI standard.  The device will request enclosure information only
when a SCSI command has requested the standard information.

In all ways other than those items described here, SFF-8067 compliant
disks are identical to SFF-8045 disks.

n.   References

	SCSI-3 Primary Commands (SPC), X3T10/Project 995D/Rev 11 or above

	SCSI-3 
	
TECHNICAL CONTENT PAGES

5.  Physical Positioning Requirements 

The disk shall meet the form factor, connector positioning, and connector
definition requirements of SFF-8045.

6.  Signals 

6.1 	Conventions

6.1.1  Signal Conventions 

Signal names are shown in all upper case letters. Signals can be asserted 
(active, true) in either a high (more positive voltage) or low (less positive 
voltage) state. A dash character (-) at the beginning or end of a signal name 
indicates it is asserted at the low level (active low). No dash or a plus 
character (+) at the beginning or end of a signal name indicates it is 
asserted high (active high). An asserted signal may be driven high or low by 
an active circuit, or it may be allowed to be pulled to the correct state by 
the bias circuitry. Details of the requirements are included in the signal 
definitions.

Unless noted otherwise, tables specify the voltage and/or current requirements 
at the device connector. Current flow into the device is positive and current 
flow out of the device is negative. 

6.1.2  Glossary

Backplane:	The components of the enclosure that mechanically support
		the SCA connector and create or route the required 
		signals and power to the SCA connector from the enclosure.  
		The backplane may be a true multi-device backplane, a paddle 
		card inserted in a host computer, a paddle card attached to 
		an appropriately designed cable, or any component with
		similar capabilities.

Drive:		The SCSI peripheral that plugs into the 
		backplane using the SCA connector.  The device may
		be removable from the enclosure through an
		external port or may be permanently installed in the 
		enclosure.  The SCSI peripheral may be any SCSI
		device of any type that meets one of the standard form factors
		and establishes its connection to the FC-AL through
		a standard SFF-8045 SCA-2 connector.

6.2  Signal Assignments 

The signals that are not defined in this clause are defined by SFF-8045. 

The signal pinout is shown in Table 6-1. 

               TABLE 6-1  SFF-8067 SIGNAL ASSIGNMENTS 
 +--------------------------+-----------------+---------------------------+ 
 | 40-pin SFF-8067          |    Driven by    | 40-pin SFF-8067           | 
 | Connector Contact        | Backplane/Drive | Connector Contact         | 
 | and Signal Name          |                 | and Signal Name           | 
 +--------------------------+--------+--------+---------------------------+ 
 |  1  -ENBL BYP CH1    (S) |   D    |    B   | (L) 12V CHARGE         21 | 
 |  2  12 VOLTS         (S) |   B    |    B   | (L) GROUND (12 V)      22 | 
 |  3  12 VOLTS         (S) |   B    |    B   | (L) GROUND (12 V)      23 | 
 |  4  12 VOLTS         (S) |   B    |    B   | (S) +PORT 1_IN         24 | 
 |* 5  -PARALLEL ESI    (S) |   D    |    B   | (S) -PORT 1_IN         25 | 
 |  6  -DRIVE PRESENT   (S) |   D    |    B   | (L) GROUND (12 V)      26 | 
 |  7  READY LED OUT    (S) |   D    |    B   | (S) +PORT 2_IN         27 | 
 |  8  SPINDLE SYNC     (S) |  B/D   |    B   | (S) -PORT 2_IN         28 | 
 |  9  START_1/MATED    (S) |   B    |    B   | (L) GROUND (12 V)      29 |
 | 10  START_2/MATED    (S) |   B    |    D   | (S) +PORT 1_OUT        30 | 
 | 11  -ENBL BYP CH2    (S) |   D    |    D   | (S) -PORT 1_OUT        31 | 
 |*12  SEL_6 / -DSK_WR  (S) |  B/D   |    B   | (L) GROUND (5/3.3 V)   32 | 
 |*13  SEL_5 / -DSK_RD  (S) |  B/D   |    D   | (S) +PORT 2_OUT        33 | 
 |*14  SEL_4 / -ENCL_ACK(S) |   B    |    D   | (S) -PORT 2_OUT        34 | 
 |*15  SEL_3 / D(3)     (S) |  B/D   |    B   | (L) GROUND (5/3.3 V)   35 | 
 | 16  FAULT LED OUT    (S) |   D    |   B/D  | (L) SEL_2 / D(2)       36*| 
 | 17  OPT 3.3 VOLTS    (S) |   B    |   B/D  | (L) SEL_1 / D(1)       37*| 
 | 18  OPT 3.3 VOLTS    (S) |   B    |   B/D  | (L) SEL_0 / D(0)       38*| 
 | 19  5 VOLTS          (S) |   B    |    B   | (L) OPT 3.3V CHARGE    39 | 
 | 20  5 VOLTS          (S) |   B    |    B   | (L) 5V CHARGE          40 | 
 +--------------------------+--------+--------+---------------------------+
 |  Guide pins:	Connected to GROUND (5/3.3V) on backplane and device.     |
 |                                                                        |
 |  * indicates signals whose definitions are changed from SFF-8045 to    |
 |    SFF-8067.                                                           |
 +------------------------------------------------------------------------+ 

6.3  Design Considerations 

Except as specified in this document, there are no additional design
considerations to those described in SFF-8045.

6.4  SEL_n and Enclosure Service Interface operation

6.4.1	Signal Descriptions

6.4.1.1  -PARALLEL ESI

The -PARALLEL ESI signal is controlled by the SCSI device to request the
enclosure to provide the SEL_n physical addressing signals, to request
the enclosure to provide the -PARALLEL ESI signals defined by SFF-8045,
and to request the execution of an ESI Block Read or an ESI Block Write
operation as defined in this specification.  The electronic characteristics
of the -PARALLEL ESI signal are described in Table 6-2.


  		TABLE 6-2  OUTPUT CHARACTERISTICS OF -PARALLEL ESI

        +---------------+-------------------------+-----------------+ 
        |    State      | Current Drive Available | Output Voltage  | 
        +---------------+-------------------------+-----------------+ 
        |     HIGH      | -100 uA < IOH  < 100 uA | 0 < VOH < 5.25V | 
        +---------------+-------------------------+-----------------+ 
        |     LOW       |       IOL > 2 mA        | 0 < VOL < 0.5V  | 
        +---------------+-------------------------+-----------------+ 

SFF-8067 devices are required to implement the -PARALLEL ESI signal.

SFF-8067 backplanes are required to implement the -PARALLEL ESI signal.
A pull-up resistor of a minimum of 3 k ohms on the backplane is used to hold 
the signal in the negated state until it is driven by the device.

SFF-8067 devices installed in an SFF-8045 backplane will retrieve the
optional P_ESI_n signals if the SCSI device asserts -PARALLEL ESI.
This case will be differentiated from installation in a normal
SFF-8067 backplane during the discovery phase of a transfer.

SFF-8045 devices installed in an SFF-8067 backplane will not perform
the discovery process correctly.  Null enclosure status will be
transmitted in such a case.

Sections 6.4.2, 6.4.3, and 6.4.4 show how -PARALLEL ESI is used in
the Enclosure Service Interface sequencing.

6.4.1.2  SEL_n signals 

The SEL_n signals are established by the backplane when the -PARALLEL ESI 
signal from the SCSI device is negated.  The SEL_n signals shall be 
established at the SCSI device connector within 1 microsecond of the
negation of -PARALLEL ESI.

The backplane uses SEL_6 through SEL_0 ID lines to provide the binary value of 
the Loop Identifier to the device in that location. A SEL decode of 126  
creates an AL_PA of 0 and is reserved for the fabric port, if any.  A SEL 
decode of 127 is a flag for the device to use a soft address for the
AL_PA.  The SEL lines are used in a system to assign a physical location for 
each connection to a backplane, allowing the management of configuration and 
the simple identification of devices that need to be changed for maintenance 
reasons. The SEL lines specify the hard address for each device unless the 
system is required to override the values to manage duplicate SEL decodes. 

The asserted (high) state establishes the binary 1 value. 

 - SEL_6 is the most significant binary bit, having the value of 2**6. 
 - SEL_0 is the least significant binary bit, having the value of 2**0. 

The Loop Identifier is mapped according to tables in FC-AL to the proper AL_PA 
(AL Physical Address) for the SCSI device. 

If a device were removed from the backplane and plugged into a different 
location in the backplane, the system normally uses the label information 
recorded on the device to recognize where this device should be mapped into its 
file management tables. This flexibility can be very desirable in data 
security applications or for configuration expansion. In some RAID 
configurations, the physical location in a string of disk devices can 
be extremely important and should remain consistent. It is recommended that
physical location dependent systems use the capability to read the SEL ID 
value and the logical address to ensure proper configuration in the event 
of a maintenance or other error. 

The ID Selection signals are tested by the device at power on to determine  
the proper Loop Identifier for a device. The signals may be tested at other 
times as required by the device. The ID Selection 
signal is expected to remain constant for a given device location, although 
some bits may be settable externally to differentiate the Loop Identifiers for 
different enclosures.  

The high state is the asserted state and the low state is the negated state 
for the SEL_n signals, as described in Table 6-3. The driver on both the
backplane and on the device shall be an open collector driver or other 
circuit without an active drive to the high state. The pull-up resistor 
shall be on the backplane and shall have a value appropriate to limit the 
required assertion drive to less than the specified Iol.  The resistance
should not be less than 3 k ohms.

The SEL_n signals are multiplexed to carry the ESI control signals,
-DSK_WR, -DSK_RD, and -ENCL_ACK, and the ESI data signals, D(3), D(2),
D(1), and D(0).  The signals for each backplane slot must be driven
individually and not bussed with those of another slot.


          TABLE 6-3  SEL_n & ESI SIGNAL ELECTRICAL CHARACTERISTICS 
   +-------------------+-------------------+--------------------------+ 
   | Circuit/State     |      Voltage      |        Current           | 
   +-------------------+-------------------+--------------------------+ 
   | Driver/Asserted   |  0   < Vol < 0.5V | Iol < 1.6 mA into driver | 
   +-------------------+-------------------+--------------------------+ 
   | Driver/Negated    |  2.0 < Voh < 5.25 | -20 uA < Ioh < 20 uA     | 
   +-------------------+-------------------+--------------------------+ 
   | Driver/Disabled   | -0.5 < V   < 5.25 | -20 uA < Ioh < 20 uA     | 
   +-------------------+-------------------+--------------------------+ 
   | Receiver/Asserted |  0   < Vol < 0.8V | -20 uA < Ioh < 20 uA     |
   +-------------------+-------------------+--------------------------+ 
   | Receiver/Negated  |  2.4 < Vih < 5.25 |  -20 uA < Ioh < 20 uA    |
   +-------------------+-------------------+--------------------------+ 
   | Receiver/Disabled | -0.5 < V   < 5.25 |  -20 uA < Ioh < 20 uA    |
   +-------------------+-------------------+--------------------------+ 

6.4.1.3  -DSK_WR, -DSK_RD,  -ENCL_ACK,  D(3), D(2), D(1), D(0)

The SEL_n signals change their properties when the SCSI device
asserts the -PARALLEL ESI signal.  When the -PARALLEL ESI signal
is asserted, these signals operate as a bidirectional nibble (4-bit) wide
communications interface under control of the device.  Every
transfer takes place in three phases.  The discovery phase verifies
that the enclosure and the device are both capable of SFF-8067
interactions.  The command phase transfers a description of the
operation to be performed by the enclosure services processor.  The
data transfer phase moves information provided by a SCSI command out to the
enclosure services processor or moves information from the enclosure
services processor into the SCSI device for transfer inbound on the
SCSI interface.  The electronic properties are as defined in table 6-3.

Rules are additionally provided for those enclosures that meet
a simplified subset of the SFF-8067 interface and for those enclosures
that meet only SFF-8045 requirements.

The signal -DSK_WR is driven by the device to clock data
outbound from the device to the enclosure during the command phase
and an outbound data phase.

The signal -DSK_RD is driven by the SCSI device to clock data
inbound from the device to the enclosure during an inbound data phase.

Both -DSK_WR and -DSK_RD take part in the discovery phase.

The signal -ENCL_ACK is driven by the enclosure services processor
to indicate that outbound data is received and that inbound data is
valid.

The signals D(3), D(2), D(1), and D(0) carry information to and from
the processor.  The conventions for transfer order are as described
in tables 6.4 and 6.5.

	Table 6.4   BIT AND BYTE ORDER IN ESI TRANSFERS
                        _______________________________________________
                       |     |     |     |     |     |     |     |     |
 bit order in byte     |  7  |  6  |  5  |  4  |  3  |  2  |  1  |  0  |
                       |_____|_____|_____|_____|_____|_____|_____|_____|
 transfer order on     |                       |                       |
   ESI interface       | FIRST NIBBLE          |  SECOND NIBBLE        |
                       |_____|_____|_____|_____|_____|_____|_____|_____|
 bit order in ESI      |     |     |     |     |     |     |     |     |
   data                |D(3) |D(2) |D(1) |D(0) |D(3) |D(2) |D(1) |D(0) |
                       |_____|_____|_____|_____|_____|_____|_____|_____|
                       |     |     |     |     |     |     |     |     |
 order in standard     |  7  |  6  |  5  |  4  |  3  |  2  |  1  |  0  |
    SCSI data string   |_____|_____|_____|_____|_____|_____|_____|_____|


		Table 6.5   BYTE ORDERING IN ESI TRANSFERS

                        ________________________   _______________________
                       |          |          |      |          |          |
  byte order on ESI    | first    | second   | .... | n-1      | n        |
     interface         |__________|__________|__  __|__________|__________|
                       |          |          |      |          |          |
  byte order in SCSI   | 0        | 1        | .... | n-1      | n        |
     or SFF-8067       |__________|__________|__  __|__________|__________|
     specified string

6.4.2	Data Transfer Protocol

An enclosure services information transfer is initiated when a SCSI device
receives a SCSI command of SEND DIAGNOSTIC or RECEIVE DIAGNOSTIC RESULTS 
specifying an Enclosure Services page to be transferred. 

The device first asserts -PARALLEL_ESI , waiting a minimum of 1uS 
for SEL_ID to be removed from the SEL_n signals as specified by SFF-8045.
The device and enclosure then execute the Discovery phase, as described
below.  After successfully identifying the enclosure as supporting
the SFF-8067 Enclosure Services protocol, the device performs a Command
phase (using a fixed number of Write phase transfers) that provides 
the identification of the page to be transfered and
the direction of the transfer.  After the Command phase, the device
performs a Read or Write phase to transfer the information block as 
defined by SCSI. When the Read or Write phase is complete, -PARALLEL_ESI 
is negated and SEL_ID returns within 1uSec. 
  
The negation of -PARALLEL_ESI is a message to the enclosure 
that whatever the state of the protocol, the entire transaction has 
been halted.  A host block read command will generate Write and 
Read sequences per the example below:

		Figure 6.1   SUMMARY OF TRANSFER PHASES

              ____                                         __________
-PARALLEL_ESI     \_______________________________________/

Enclosure DLY  -->| |<-- 1uSec Max           1uSec Max -->| |<--
              ______ _________ _____________ _______________ ________
ESI INTF      ______X_________X_____________X_______________X________
              SEL_ID  DISCOV.    COMMAND       READ OR WRITE  SEL_ID

6.4.2.1	Enclosure discovery phase

During the Discovery phase, the disk tests the enclosure interface
for the following conditions:

	a)	Enclosure is an SFF-8067 enclosure

	b)	Enclosure services circuit is available and
		not occupied by other SCSI devices.

	c)	SFF-8067 enclosure is operating correctly.

Figure 6.2 provides a flowchart of the discovery process, together
with the appropriate ASC/ASCQ indication.  The text following the flow
chart explains the discovery sequences.  Timing charts are also provided.

		Figure 6.2	DISCOVERY FLOW CHART

          _______________________
         |                       |
         | assert -PARALLEL ESI  |
         |_______________________|
                    |
                    |
 Do bits SEL_(0:3)  /\
 invert in < 1 us. /  \ 
                  /    \____________________________________
                  \    /  no                                |
                   \  /                                     |
                    \/                                      /\
                    |  yes              Do bits SEL_(0-7)  /  \   no
                    |                   change at all     /    \__________
                    |                                     \    /          |
                    /\                                     \  /           |
 Does -ENCL_ACK    /  \                                     \/            |
 assert in < 1 s  /    \______________________              | yes         |
                  \    /  no                  |             |             |
                   \  /                       |             |             |
                    \/                        |             |             |
                    |  yes                    |             |             |
        ____________|_____________            |             |             |
       |                          |           |             |             |
       | assert -DSK_RD, -DSK_WR  |           |             |             |
       |__________________________|           |             |             |
                    |                         |             |             |
                    |                         |             |             |
                    |                         |             |             |
                    /\                        |             |             |
 Does -ENCL_ACK    /  \                       |             |             |
 negate in        /    \_____________         |             |             |
 < 100 microsec   \    /  no         |        |             |             |
                   \  /              |        |             |             |
                    \/               |        |             |             |
                    |  yes           |        |             |             |
        ____________|_____________   |        |             |             |
       |                          |  |        |             |             |
       | negate -DSK_RD, -DSK_WR  |  |        |             |             |
       |__________________________|  |        |             |             |
                    |                |        |             |             |
                    |                |        |             |             |
                    V                |        V             |             V
              assume enclosure       |  assume enclosure    |   assume enclosure
                is SFF-8067          |    is SFF-8067       |     is SFF-8045
              continue command       |   post TBD/02        |   w/o parallel ESI
                and data xfer        |                      |    post TBD/01
                                     |                      |
                                     V                      V
                               assume enclosure      assume enclosure
                                is SFF-8045            is SFF-8045
                               with parallel ESI.     with parallel ESI
                                provide ESI info     provide ESI info


An SFF-8067 SCSI device requests access to the enclosure's control
circuitry by asserting -PARALLEL_ESI.  The enclosure shall
remove the SEL_ID value from SEL_n within 1 microsecond.  SEL_4 shall take
on the value corresponding to -ENCL_ACK, SEL_5 and SEL_6 shall be released
so that the device can manage them as -DSK_RD and -DSK_WR respectively,
and SEL_0, SEL_1, SEL_2, and SEL_3 shall be replaced by the enclosure
with the complement of their values as a selection ID.  This transition
is detected by the SFF-8067 device, which immediately understands
that the enclosure will probably accept further SFF-8067 communication 
procedures. If the SEL_0 - SEL_3 value is not complemented within 
1 microsecond, the device considers that the enclosure is not compliant with
SFF-8067 procedures.  If any of the signals SEL_0 - SEL_6 value changes
to a value other than the expected value from the 
enclosure, the device assumes that the enclosure
is compliant with the parallel ESI function defined for SFF-8045.
If the SEL_ID value does not change within 1 microsecond, the device 
assumes that the enclosure is compliant with SFF-8045.  If the SEL_ID value
does not change, the SCSI device cannot determine through this interface 
whether the enclosure is providing parallel ESI information the same as
the SEL_ID value or whether the enclosure does not support parallel ESI.
This must be determined by testing a second device on the same enclosure
or by knowledge of the expected enclosure bit values. (See section 7 for 
status conditions.)

The enclosure uses the -PARALLEL_ESI indication from each participating
device slot to select which device slots are requesting service.  The
enclosure switches its controls to whichever device slot it wants to
communicate with first, then asserts the -ENCL_ACK signal to that
device slot only.  Another device slot will only receive the -ENCL_ACK
signal after the enclosure has finished its work with the present
device slot.  If the SCSI device detects that the -ENCL_ACK signal did not
return in less than one second, the device considers that the
enclosure services circuitry is either unavailable or is not operational
and negates -PARALLEL_ESI.  (See section 7 for status conditions) 

After the -ENCL_ACK is received by the device, the device asserts both
DSK_RD and DSK_WR together.  The enclosure shall negate ENCL_ACK within
100 microseconds.  If the enclosure does not negate ENCL_ACK, the device
assumes that the enclosure is an SFF-8045 enclosure that provides parallel
ESI information and that by chance the parallel ESI information contained
the inverted SEL_(0:3) bits and asserted the -ENCL_ACK bit at the proper
time.  The device posts the information using the SFF-8045 format.

After the discovery phase has been successfully completed, the enclosure
has been identified as an SFF-8067 enclosure, and the enclosure has
indicated that it is available to the SCSI device with the assertion of
-ENCL_ACK, the enclosure shall respond to any device request
(-DSK_WR or -DSK_RD) within a single phase in less than 100 microseconds.
The failure of -DKS_WR or -DSK_RD to negate after the discovery process
is detected as an SFF-8067 Enclosure Transfer Failure (timeout of the
command phase transfer).

The enclosure shall respond to the first data transfer request following
a command phase in less than 1 millisecond.  The device shall implement
appropriate timeouts with those minimum values to determine that the
enclosure is operating normally.  The specified check condition shall be
presented if the timeouts are exceeded.

The enclosure may implement timeouts to determine that the device is
continuing an SFF-8067 communication normally.  The timeout shall be
a minimum of 100 milliseconds.  After the timeout is exceeded with no
actions performed by the SCSI device, the enclosure may ignore -PARALLEL ESI
|from that device until the signal is negated and once again asserted.
The enclosure may post error conditions and may report those conditions
to other devices.

	Figure 6.3   DISCOVERY PHASE (SFF-8067 ENCLOSURE)

             ________                                              
-PARALLEL ESI        \__________________________________________
                  -->|  |<--1uS max enclosure delay                   
             ____________________              _________________
-DSK_WR      SEL_6      /        \____________/
             ____________________              _________________
-DSK_RD      SEL_5      /        \____________/		       
             _________________________________
D(0:3)       SEL_(0:3)  /-SEL_ID(0:3)_________XXXXXXXXXXXXXXXXXX                                               
             ________________                ___________________
-ENCL_ACK    SEL_4      /    \______________/                    

                  -->|       |<-- 1 S max enclosure delay                    
                         ^    ^              ^   ^
                         |    |              |   |
                         |    |              |   |_
                         |    |              |   Failure of -DSK_RD and
                         |    |              |   or -DSK_WR to negate is 
                         |    |              |   detected as SFF-8067 timeout
                         |    |              |_
                         |    |              SCSI device recognizes 
                         |    |             availability of enclosure
                         |    |             services and negates -DSK_RD
                         |    |             and -DSK_WR.
                         |    |_
                         |      Enclosure Services Processor indicates
                         |      that it is ready to begin communication
                         |      with the SCSI device.
                         |_
                            SCSI device determines that enclosure is SFF-8067
                            compliant by noting that SEL_(0:3) bits have 
                            inverted and that SEL_6 and SEL_7 have the value
                            that the device is presenting.


	Figure 6.4   DISCOVERY PHASE (SFF-8045 ENCLOSURE WITH PARALLEL ESI)

             _________                     _______________________   
-PARALLEL ESI         \___________________/
                   -->|  |<--1uS max enclosure delay                   
                        _ __     ____________ ___       __________
-DSK_WR      SEL_6      _X__-EFW ____________X___ SEL_6 __________
                        _ __          _______ ___       __________
-DSK_RD      SEL_5      _X__-P_ESI_5  _______X___ SEL_5 __________
                        _ __               __ ___           ______
D(0:3)       SEL_(0:3)  _X__-P_ESI_(0:3)   __X___ SEL_(0:3) ______
                        _ __          _______ ___       __________
-ENCL_ACK    SEL_4      _X__-P_ESI_4  _______X___ SEL_4 __________

                          ^                   ^   
                          |                   |_
                          |                     Enclosure returns to
                          |                     transmitting SEL_ID < 1 usec
                          |                     after -PARALLEL ESI is negated.
                          |                     Drive will not initiate any
                          |                     SFF-8067 transfer actions, but
                          |                     shall report parallel ESI
                          |                     information in the normal 
                          |                     manner.
                          |_
                            SCSI device determines that enclosure is SFF-8045
                            compliant and implement P_ESI by noting that SEL_ID 
                            bits have changed to a value other than the
                            expected value.


	Figure 6.5   DISCOVERY PHASE (SFF-8045 ENCLOSURE WITHOUT PARALLEL ESI)

             _________                     _______________________   
-PARALLEL ESI         \___________________/
                   -->|  |<--1uS max enclosure delay                   
                        _ __     ____________ ___       __________
-DSK_WR      SEL_6      _X__unchanged _______X___ SEL_6 __________
                        _ __          _______ ___       __________
-DSK_RD      SEL_5      _X__unchanged _______X___ SEL_5 __________
                        _ __          _______ ___           ______
D(0:3)       SEL_(0:3)  _X__unchanged _______X___ SEL_(0:3) ______
                        _ __          _______ ___       __________
-ENCL_ACK    SEL_4      _X__unchanged _______X___ SEL_4 __________

                          ^                   ^   
                          |                   |_
                          |                     Enclosure returns to
                          |                     transmitting SEL_ID < 1 usec
                          |                     after -PARALLEL ESI is negated.
                          |_
                            SCSI device determines that enclosure is SFF-8045
                            compliant and either does not support P_ESI or
                            has a P_ESI value the same as the SEL_ID value by 
                            noting that the SEL_ID bits have not changed.
                            Device shall report a check condition as specified.

The interface is designed to be supported by a simple  
bit programmable bidirectional port on the SCSI device. 

If an 8067 device is plugged into an 8045 backplane, it shall operate as an 
8045 device.  If an 8045 device is plugged into an 8067 backplane, there 
is no potential for damage but the device will not receive valid parallel
ESI information from the enclosure, since the enclosure cannot determine
whether to offer parallel ESI information or the required SFF-8067 information.


6.4.2.2	Write Phase and Command Phase transfer procedure

To perform a Write or Command Phase transfer, the device places 
the first nibble of data on D(0:3), and a minimum of 
100 nanoseconds later, the device asserts -DSK_WR.  
When the enclosure sees -DSK_WR asserted, it reads D(0:3) and 
asserts -ENCL_ACK.  When the device sees the asserted -ENCL_ACK, it negates
-DSK_WR and is allowed to modify D(0:3) to the new value.  If this is the
last transfer before a Read phase is to be initiated, then D(0:3) shall
be released.  When the enclosure sees  -DRV_WR negated, it negates -ENCL_ACK.
The device can then proceed with more Write or Read sequences.


	Figure 6.6   Data transfer procedure for Write and Command Phases

          _________        ___________      _______      ________
-DSK_WR            \______/           \____/       \____/
            --->|  |<--100 nsec min
                 ____________        _________    ________    
D(0:3)    XXXXXXX____________XXXXXXXX_________XXXX________XXXXXXX
          ____________        ___________      ______      ______
-ENCL_ACK             \______/           \____/      \____/


Subsequent nibbles are provided according to the rules of byte ordering
until all the required data has been transferred.

6.4.2.3	Read Phase transfer procedure 

To perform a Read phase transfer, the device asserts -DSK_RD.  When the 
enclosure sees -DSK_RD asserted, it places the first nibble of data 
onto D(0:3), and a minimum of 100 nanoseconds later, asserts -ENCL_ACK.  
When the device sees the asserted -ENCL_ACK, it reads D(0:3) and 
negates -DSK_RD.  When the enclosure sees the -DRV_RD negated, it negates 
-ENCL_ACK and begins to drive new data to D(0:3).   The device can then 
proceed with more Read Phase transfers.  


	Figure 6.7   Data transfer procedure for Read Phases

          _______          ________         __________         _____
-DSK_RD          \________/        \_______/          \_______/
                    __________        ________           ________    
D(0:3)    XXXXXXXXXX__________XXXXXXXX________XXXXXXXXXXX________XXX
          ____________        __________      _____________      ___
-ENCL_ACK             \______/          \____/             \____/
               --->|  |<--100 nsec min

Subsequent nibbles are provided according to the rules of byte ordering
until all the required data has been transferred.



7.	Mapping of SCSI command to Enclosure Service Interface operation

7.1 	Brief review of SCSI command set

The enclosure services device model is defined in SCSI-3 Enclosure 
Services command set (SES),  X3T10/Project 1212, revision 8.  
The device model allows commands accessing enclosure
services information to be executed to any device.  In addition, the
model defines the capability of accessing the same information
through a special enclosure services device type that can be run
on a target and logical unit independent of any other SCSI device.

The commands used by all devices for the transmission of enclosure
services information are the SEND DIAGNOSTIC and RECEIVE DIAGNOSTIC
RESULTS commands.  The SEND DIAGNOSTIC command transmits pages of
information to the device for transfer to the enclosure across the
interface defined by SFF-8067.  The RECEIVE DIAGNOSTIC RESULTS
command requests pages of information from the device, which the
device must obtain from the enclosure across the interface defined by
SFF-8067.  

The SCSI commands obey all the normal rules for SCSI commands, including
disconnection and tagged queueing.  The CDB formats for the commands are 
shown in Figures 7.1 and 7.2.


	Figure 7.1 - SCSI RECEIVE DIAGNOSTIC RESULTS CDB (reference)

		=======================================
		| Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
		|Byte |   |   |   |   |   |   |   |   |
		=======================================
		|  0  |     SCSI Opcode = 1Ch         |
		---------------------------------------
		|  1  |          Reserved             |
		---------------------------------------
		|  2  |           page code           |
		--------------------------------------- 
		|  3  |    Allocation Length (MSB)    |
		---------------------------------------
		|  4  |    Allocation Length (LSB)    | 
		--------------------------------------- 
		|  5  |         Control               | 
		--------------------------------------- 



	Figure 7.2 - SCSI SEND DIAGNOSTIC CDB (reference)

		=======================================================
		| Bit |  7  |  6  |  5  |  4  |  3  |  2  |  1  |  0  |
		|Byte |     |     |     |     |     |     |     |     |
		=======================================================
		|  0  |             SCSI Opcode = 1Dh                 |
		-------------------------------------------------------
		|  1  |                 |  PF |rsrvd|STst |DoffL|UoffL|
		-------------------------------------------------------
		|  2  |                reserved                       |
		-------------------------------------------------------
		|  3  |            Allocation Length (MSB)            |
		-------------------------------------------------------
		|  4  |            Allocation Length (LSB)            | 
		-------------------------------------------------------
		|  5  |                    Control                    | 
		-------------------------------------------------------


The PF (Page Format) bit shall be 1 for a SEND DIAGNOSTIC 
command that transmits information to an enclosure.

The SES standard defines the following page codes for transmitting information
to and from an enclosure.  The content of the pages is specified by SES.

       Table 7.1   PAGE CODES DEFINED FOR ESI AND NON-ESI FUNCTIONS

=========================================================================
|           |      |                          |                          |
| Page Code |  Ref | SEND DIAGNOSTIC function | RCV DIAG RSLT function   |
|___________|______|__________________________|__________________________|
|           |      |                          |                          |
|    00     | SPC  |  Reserved                | Supported Diagnostics    |
|           |      |                          |                          |
|___________|______|__________________________|__________________________|
|           |      |                          |                          |
|    01     | SES  |  Reserved                | Configuration            |
|___________|______|__________________________|__________________________|
|           |      |                          |                          |
|    02     | SES  |  Enclosure Control       | Enclosure Status         |
|___________|______|__________________________|__________________________|
|           |      |                          |                          |
|    03     | SES  |  Reserved                | Help Text                |
|___________|______|__________________________|__________________________|
|           |      |                          |                          |
|    04     | SES  |  String Out              | String In                |
|___________|______|__________________________|__________________________|
|           |      |                          |                          |
|    05     | SES  |  Threshold Out           | Threshold In             |
|___________|______|__________________________|__________________________|
|           |      |                          |                          |
|    06     | SES  |  Array Control           | Array Status             |
|___________|______|__________________________|__________________________|
|           |      |                          |                          |
|    07     | SES  |  Reserved                | Element Descriptor       |
|___________|______|__________________________|__________________________|
|           |      |                          |                          |
|    08     | SES  |  Reserved                | Short Enclosure Status   |
|___________|______|__________________________|__________________________|
|           |      |                          |                          |
|   09-0F   | SES  |  Reserved for SES        | Reserved for SES         |
|___________|______|__________________________|__________________________|
|           |      |                          |                          |
|   40-7F   | SPC  |  defined for each device | defined for each device  |
|___________|______|__________________________|__________________________|
|           |      |                          |                          |
|   80-FF   | SPC  |  vendor-specific         | vendor-specific          |
|___________|______|__________________________|__________________________|


The general format of a page as defined by the SCSI-3 Primary Command 
document is shown in table 7.2.  

		Table 7.2	DIAGNOSTIC PAGE FORMAT

		=======================================================
		| Bit |  7  |  6  |  5  |  4  |  3  |  2  |  1  |  0  |
		|Byte |     |     |     |     |     |     |     |     |
		=======================================================
		|  0  |                 Page Code                     |
		-------------------------------------------------------
		|  1  |                summary bits                   |
		-------------------------------------------------------
		|  2  |               Page Length (MSB)               |
		-------------------------------------------------------
		|  3  |               Page Length (LSB)               | 
		-------------------------------------------------------
		| 4-n |      SES Parameters for specified page        | 
		-------------------------------------------------------

The Page Length contains the count of the SES parameters that will be
provided.  The actual length of the page is 4 greater than the
value specified by the Page Length, since the header is not counted
in the Page Length.

7.2	Definition of command bytes for enclosure

If a SCSI device receives one of the SCSI diagnostic commands with a page
code value between 01h and 0Fh, it prepares the proper information for
transmission to the enclosure in a command phase.  The command phase
is composed of 4 bytes, as defined in table 7.3.  The command phase is
always clocked with -DSK_WR.

		Table 7.2	ESI COMMAND PHASE INFORMATION

		=======================================================
		| Bit |  7  |  6  |  5  |  4  |  3  |  2  |  1  |  0  |
		|Byte |     |     |     |     |     |     |     |     |
		=======================================================
		|  0  |                   Page Code                   |
		-------------------------------------------------------
		|  1  |                                         | SEND|
		-------------------------------------------------------
		|  2  |(MSB)                                          |
		-----------  SEND DIAGNOSTIC parameter Length   -------
		|  3  |                                          (LSB)| 
		-------------------------------------------------------

The page code specifies the SES page that is to be transferred to or
|from the enclosure.  

If the SEND bit is set to 1, the subsequent data transmission will be 
|from the device to the enclosure as the result of a SCSI SEND DIAGNOSTIC 
command.  The data transmission will be clocked with -DSK_WR from the
SCSI device.  If the SEND bit is set to 0, the subsequent data transmission
will be from the enclosure to the device as the result of a SCSI SEND
DIAGNOSTIC RESULTS command.  The data transmission will be clocked
with -DSK_RD from the SCSI device.

The SEND DIAGNOSTIC parameter length is 0 for a RECEIVE DIAGNOSTIC 
RESULTS command.  

For a SEND DIAGNOSTIC command, the SEND DIAGNOSTIC parameter length is the page
length from the diagnostic page header incremented by 4, and reflects
the total number of bytes that will be transferred to the enclosure
unless the transfer is truncated by a shorter allocation length.

7.3	Transmission of SEND DIAGNOSTIC pages to enclosure

When an SFF-8067 SCSI device receives a SEND DIAGNOSTIC command, it
examines the CDB to determine the allocation length and to determine
that the PF (Page Format) bit is set.  If these conditions are met, it
obtains at least 4 bytes of the parameters and examines the
diagnostic page header.  If the page code value is from 01h to 0Fh 
inclusive, the device prepares to communicate with the enclosure by executing a
Discovery phase.  SEND DIAGNOSTIC commands that do not involve
enclosure activity are handled by the SCSI device according to the
requirements of the SCSI SPC standard.

	If the Discovery phase determines that the enclosure is
	an SFF-8045 compliant enclosure, the device posts a
	CHECK CONDITION to the SCSI initiator with sense information
	indicating an ASC/ASCQ of Unsupported Enclosure Function.
	The device negates -PARALLEL ESI to terminate the communication
	with the enclosure.

	If the Discovery phase determines that the enclosure is
	an SFF-8067 compliant enclosure, but the enclosure does 
	not assert -ENCL_ACK before the 1 second timeout period, 
	the device posts a CHECK CONDITION to the SCSI initiator
	with sense information indicating an ASC/ASCQ of
	Enclosure Services Unavailable.  The SEND DIAGNOSTIC command
	can be tried again later or can be executed on another device
	in the same enclosure. The device negates -PARALLEL ESI to 
	terminate the communication with the enclosure.

	If the Discovery phase determines that the enclosure is
	an SFF-8067 compliant enclosure and is responding correctly,
	the device begins transmission of the ESI Command phase.

The ESI Command transmits the page code extracted from the SCSI
diagnostic page to the enclosure.  The ESI command transmits the
SEND bit with a 1 value to the enclosure.  The ESI command transmits
the SEND DIAGNOSTIC parameter length, which is set to 4 more than
the page length in the diagnostic page.

	If the time between the assertion of -DSK_WR by the device
	and the assertion of -ENCL_ACK by the enclosure exceeds
	the device's timeout value (minimum timeout = 100 usec), the
	device posts a CHECK CONDITION to the SCSI initiator with
	an ASC/ASCQ indication of Enclosure Transfer Failure.
	The device negates -PARALLEL ESI to terminate the communication
	with the enclosure.

The device then begins to execute the data transmission out to the
enclosure.  The entire diagnostic page is transferred to the enclosure
unchanged, including the header (page code, reserved byte, and 
page length) and the ESI parameters.

	If the time between the assertion of the first -DSK_WR
	and the first -ENCL_ACK of the data transfer exceeds the 
	device's timeout value (minimum timeout = 1 millisecond), the
	device posts a CHECK CONDITION to the SCSI initiator with an
	ASC/ASCQ indication of Enclosure Transfer Refused.
	The device negates -PARALLEL ESI to terminate the communication
	with the enclosure.  The enclosure services processor may
	refuse the transfer if the format of the command is invalid.

	If the time between the assertion of -DSK_WR by the device
	and the assertion of -ENCL_ACK by the enclosure exceeds
	the device's timeout value (minimum timeout = 100 usec), the
	device posts a CHECK CONDITION to the SCSI initiator with
	an ASC/ASCQ indication of Enclosure Transfer Failure.
	The device negates -PARALLEL ESI to terminate the communication
	with the enclosure.

When the transfer has been completed, the device provides GOOD status
to the initiator.

Across the SCSI channel, the device requests either the number of bytes 
specified by the allocation length in the CDB or four more than the
number of bytes specified in the diagnostic page header, whichever is
smaller.  The same number of bytes are transferred to the
enclosure by the device.

The enclosure processes the parameters according to the requirements of
the enclosure services model.  Optional bits and fields may be ignored.  
Any information exceeding the page length actually required by the enclosure is 
received and ignored.  Incorrect information is not used.  If the parameter page
is too short for the requirements of the enclosure or is truncated by
an allocation length shorter than the diagnostic page length, the enclosure has
the choice of acting on those values it considers valid or ignoring
the entire page.  Warning and error states, including those associated
with invalid diagnostic page formats, may be created by the enclosure for 
future transmission in a RECEIVE DIAGNOSTIC RESULTS status page.  Such
states do not generate a SCSI status of CHECK CONDITION to the SEND DIAGNOSTIC
command.

7.4	Transmission of RECEIVE DIAGNOSTIC RESULTS pages from enclosure

When an SFF-8067 SCSI device receives a RECEIVE DIAGNOSTIC RESULTS command, it
examines the CDB to determine the allocation length and the
requested page code.  If the page code is from 01 to 0Fh, inclusive, the
device prepares to communicate with the enclosure by executing a
Discovery phase.

	If the Discovery phase determines that the enclosure is
	an SFF-8045 compliant enclosure that does not support 
	Parallel ESI or cannot be determined to support Parallel
	ESI, the device posts a CHECK CONDITION to the SCSI initiator 
	with sense information indicating an ASC/ASCQ of Unsupported 
	Enclosure Function.  The device negates -PARALLEL ESI to 
	terminate the communication with the enclosure.

	If the Discovery phase determines that the enclosure is
	an SFF-8067 compliant enclosure, but the enclosure does 
	not assert -ENCL_ACK before the 1 second timeout period, 
	the device posts a CHECK CONDITION to the SCSI initiator
	with sense information indicating an ASC/ASCQ of
	Enclosure Services Unavailable.  The SEND DIAGNOSTIC command
	can be tried again later or can be executed on another device.
	The device negates -PARALLEL ESI to terminate the communication
	with the enclosure.

	If the Discovery phase determines that the enclosure is
	an SFF-8045 compliant enclosure that supports Parallel ESI,
	the device returns the short enclosure status page (page code 08h)
	described in table 7.3, regardless of the requested page.
	GOOD status is presented and the SCSI command is completed.
	The device negates -PARALLEL ESI to terminate the communication
	with the enclosure.  Bit 7 of byte 0 indicates that the
	enclosure has been determined to be an 8045 enclosure supporting
	Parallel ESI.

	If the Discovery phase determines that the enclosure is
	an SFF-8067 compliant enclosure and responding correctly,
	the device begins transmission of the ESI Command phase.


     Table 7.3	SPECIAL STATUS PAGE FORMAT FOR SFF-8045 PARALLEL ESI

=======================================================================
| Bit |   7   |   6   |   5   |   4   |   3   |   2   |   1   |   0   |
|Byte |       |       |       |       |       |       |       |       |
=======================================================================
|  0  |                 Page Code = Status (02 hex)                   |
|_____|_______________________________________________________________|
|  1  | 8045  |  EFW  |P_ESI_5|P_ESI_4|P_ESI_3|P_ESI_2|P_ESI_1|P_ESI_0|
|_____|_______|_______|_______|_______|_______|_______|_______|_______|
|  2  |           Page Length (MSB)   = 0                             |
|_____|_______________________________________________________________|
|  3  |           Page Length (LSB)   = 0                             | 
|_____|_______________________________________________________________|


The ESI Command transmits the page code extracted from the SCSI
CDB to the enclosure.  The ESI command transmits the
SEND bit with a 0 value to the enclosure.  For the RECEIVE DIAGNOSTIC
RESULTS command, the parameter length field shall be 0.

	If the time between the assertion of -DSK_WR by the device
	and the assertion of -ENCL_ACK by the enclosure exceeds
	the device's timeout value (minimum timeout = 100 usec), the
	device posts a CHECK CONDITION to the SCSI initiator with
	an ASC/ASCQ indication of Enclosure Transfer Failure.
	The device negates -PARALLEL ESI to terminate the communication
	with the enclosure.

The device then begins to execute the data transmission from the
enclosure.  The entire diagnostic page is transferred from the enclosure
unchanged, including the header (page code, summary byte, and 
page length) and the enclosure service parameters.  The device uses bytes 2 
and 3 of the header to determine the total page length to be transferred.
The device requests a number of bytes equal to the smaller of the total
page length or the allocation length.

	If the time between the assertion of the first -DSK_RD
	and the first -ENCL_ACK of the data transfer exceeds the 
	device's timeout value (minimum timeout = 1 millisecond), the
	device posts a CHECK CONDITION to the SCSI initiator with an
	ASC/ASCQ indication of Enclosure Transfer Refused.
	The device negates -PARALLEL ESI to terminate the communication
	with the enclosure.

	If the time between the assertion of -DSK_RD by the device
	and the assertion of -ENCL_ACK by the enclosure exceeds
	the device's timeout value (minimum timeout = 100 usec), the
	device posts a CHECK CONDITION to the SCSI initiator with
	an ASC/ASCQ indication of Enclosure Transfer Failure.
	The device negates -PARALLEL ESI to terminate the communication
	with the enclosure.

When the transfer has been completed, the device provides GOOD status
to the initiator.

The SCSI device assumes no responsibility for providing correct
parameters.  If the Page Length is shorter than the Allocation Length,
the SCSI device transfers only the number of bytes calculated for the total
page length (Page Length + 4 bytes) from the enclosure and to the
initiator.  If the Page Length is longer than the Allocation Length,
the SCSI device transfers only the number of bytes indicated by
the Allocation Length from the enclosure and to the initiator.  In that
case, the Page Length in the page header is the value provided by the
enclosure, which shall reflect the full page length
that would be transferred if the Allocation Length were large enough. 
It is not an error if a RECEIVE DIAGNOSTIC RESULTS command is executed 
with an Allocation Lenth different than the Page Length + 4.

7.5	SES Additional Sense Codes and Additional Sense Code Qualifiers



	Table 7.4  ASC/ASCQ defined for ESI conditions

=========================================================================
|           |                                                            |
| ASC/ASCQ  |     Definition                                             |
|___________|____________________________________________________________|
|           |                                                            |
|  35h/00h  | Unspecified Enclosure Services Failure                     |
|___________|____________________________________________________________|
|           |                                                            |
|  35h/01h  | Unsupported Enclosure Function                             |
|___________|____________________________________________________________|
|           |                                                            |
|  35h/02h  | Enclosure Services Unavailable                             |
|___________|____________________________________________________________|
|           |                                                            |
|  35h/03h  | Enclosure Transfer Failure                                 |
|___________|____________________________________________________________|
|           |                                                            |
|  35h/04h  | Enclosure Transfer Refused                                 |
|___________|____________________________________________________________|

*
* For SCSI Reflector information, send a message with
* 'info scsi' (no quotes) in the message body to majordomo at symbios.com




More information about the T10 mailing list