DATE: Jan. 8, 1991 document X3T9.2/90-136 R3 TO: X3T9.2 Committee (SCSI) FROM: Gerry Houlder (Seagate) SUBJECT: Extensions for dual port SCSI I want to propose some extensions to SCSI-3 to handle a simple dual port implementation. If we stick with the existing connection philosophy of completing each command on the same port on which it was sent, there are very few extensions that are needed. The issues are as follows: - Define effect of SCSI bus RESET condition. (Device must reset both ports.) - Define effect of BUS DEVICE RESET and CLEAR QUEUE messages. (They should affect only the port message is received from.) - Is a BUS DEVICE RESET OTHER PORT message needed? (Yes.) - Add reference in each message defining effect on dual port so implementors don't need to infer that there is no effect. - Define effect on contingent allegiance, extended contingent allegiance, and unit attention condition. (The other port should get lumped in with the "other initiators".) - Add dual port concept to the glossary and SCSI model. (Text is proposed for sections 3.1, 4.9, and 7.1.1.4.) - Is a port identification bit needed in INQUIRY data? (Yes, two bits are added to INQUIRY data.) - Define effect on saving of MODE SELECT parameters. (Target may maintain one copy for both ports or a separate copy for each initiator on each port.) - Define effect on reservations. (A reservation should lock out the other port also.) Editorial comments are enclosed in brackets []. [Changes needed for section 3:] 3.1 Glossary [Only changed or newly defined terms are listed here.] nexus. A relationship that begins with the establishment of an initial connection and ends with the completion of the I/O process. The relationship may be restricted to specify a single logical unit or target routine by the successful transfer of an IDENTIFY message. The relationship may be further restricted by the successful transfer of a queue tag message. For dual port implementations, the relationship is restricted to the port on which the initial connection was established. [Changes needed for section 4:] 4.9 Dual Port Option SCSI devices may provide two SCSI connectors in a dual port configuration that allows any port to connect to the attached logical unit(s). If the option is implemented, the SCSI device shall provide separate transmitters and receivers for each port. The ports shall be managed by the device so that, when one port is active, the other port will either accept the command bytes and disconnect or respond with appropriate status (e.g. BUSY, CHECK CONDITION, QUEUE FULL, or RESERVATION CONFLICT). The SCSI device may allow the SCSI ID assigned to each port to be the same value or different values. [Changes needed for section 5:] 5.2.2.1 Hard Reset Alternative SCSI devices that implement the hard reset alternative, upon detection of the reset condition, shall: (1) Clear all I/O processes including queued I/O processes. (2) Release all SCSI device reservations. (3) Return any SCSI device operating modes to their appropriate initial conditions, similar to those conditions that would be found after a normal power-on reset. MODE SELECT conditions shall be restored to their last saved values if saved values have been established. MODE SELECT conditions for which no saved values have been saved shall be returned to their default values. (4) Unit attention condition shall be set (see 6.9). It is recommended that, following a reset to selection time after a hard reset condition ends, SCSI targets be able to respond with appropriate status and sense data to the TEST UNIT READY, INQUIRY, and REQUEST SENSE commands. For dual port implementations, the SCSI device shall apply the hard reset to both ports. In this case all I/O processes for both ports are cleared, reservations for both ports are released, operating modes for both ports are initialized, and unit attention is set for all initiators on both ports. Table 5-2: Message Codes ================================================================= Code Supprt Message Name Direction Neg ATN I T Bef Lst ACK ----------------------------------------------------------------- 06h O M ABORT Out Yes 0Dh O O ABORT TAG (Note 1) Out Yes 0Ch O M BUS DEVICE RESET Out Yes 14h O O BUS DEVICE RESET OTHER PORT (Note 3) Out No 0Eh O O CLEAR QUEUE (Note 1) Out Yes 00h M M COMMAND COMPLETE In --- 04h O O DISCONNECT In --- 04h O O DISCONNECT Out Yes 80h+ M O IDENTIFY In --- 80h+ M M IDENTIFY Out No 23h O O IGNORE WIDE RESIDUE (2 bytes) In --- 0Fh O O INITIATE RECOVERY In --- 0Fh O O INITIATE RECOVERY (Note 2) Out Yes 05h M M INITIATOR DETECTED ERROR Out Yes 0Ah O O LINKED COMMAND COMPLETE In --- 0Bh O O LINKED COMMAND COMPLETE (W FLAG) In --- 09h M M MESSAGE PARITY ERROR Out --- 07h M M MESSAGE REJECT In Out Yes *** O O MODIFY DATA POINTER In --- 08h M M NO OPERATION Out Yes Queue Tag Messages (2 bytes) 21h O O HEAD OF QUEUE TAG Out No 22h O O ORDERED QUEUE TAG Out No 20h O O SIMPLE QUEUE TAG In Out No 10h O O RELEASE RECOVERY Out Yes 03h O O RESTORE POINTERS In --- 02h O O SAVE DATA POINTER In --- *** O O SYNCHRONOUS DATA TRANSFER REQUEST In Out Yes *** O O WIDE DATA TRANSFER REQUEST In Out Yes 11h O O TERMINATE I/O PROCESS Out Yes 15h-1Fh Reserved 24h-2Fh Reserved for 2-byte messages 30h-7Fh Reserved ================================================================= [Key is unchanged.] NOTES: (1) The ABORT TAG and CLEAR QUEUE messages are required if tagged queuing is implemented. (2) Outbound INITIATE RECOVERY messages are only valid during the asynchronous event notification protocol. (3) The BUS DEVICE RESET OTHER PORT message is required if the dual port option is implemented. 5.6.1 ABORT [First four paragraphs are unchanged.] Previously established conditions, including MODE SELECT parameters, reservations, and extended contingent allegiance shall not be changed by the ABORT message. For dual port implementations, no I/O processes or previously established conditions for the other port are affected. IMPLEMENTORS NOTES: [This text is unchanged.] 5.6.2 ABORT TAG The ABORT TAG message shall be implemented if tagged queuing is implemented. The target shall go to the BUS FREE phase following the successful receipt of this message. The target shall clear the current I/O process. If the target has already started execution of the I/O process, the execution shall be halted. The medium contents may have been modified before the execution was halted. In either case, any pending status or data for the I/O process shall be cleared and no status or ending message shall be sent to the initiator. Pending status, data, and commands for other active or queued I/O processes shall not be affected. Execution of other I/O processes queued for the I_T_x nexus shall not be aborted. Previously established conditions, including MODE SELECT parameters, reservations, and extended contingent allegiance shall not be changed by the ABORT TAG message. For dual port implementations, no I/O processes or previously established conditions for the other port are affected. 5.6.3 BUS DEVICE RESET The BUS DEVICE RESET message is sent from an initiator to direct a target to clear all I/O processes on that SCSI device. This message has the same effect as a hard reset condition (see 5.2.2.1) to the selected SCSI device. The target shall go to the BUS FREE phase following successful receipt of this message. The target shall create a unit attention condition for all initiators (see 6.9). For dual port implementations, the hard reset condition shall apply only to the port from which the message was received. Any active I/O processes, queued I/O processes, device reservations, and operating modes for the other port are unaffected and unit attention condition is not set for initiators on the other port. 5.6.4 BUS DEVICE RESET OTHER PORT The BUS DEVICE RESET OTHER PORT message shall be implemented if the device implements the dual port option. The BUS DEVICE RESET OTHER PORT message is sent from an initiator to direct a target to clear the I/O processes associated with the other port on that SCSI device. This message has the same effect as a hard reset condition (see 5.2.2.1) on the other port of the selected SCSI device but has no effect on I/O processes, reservations, and operating modes of the port from which the message was received. The target shall create a unit attention condition for all initiators on the other port (see 6.9). 5.6.5 CLEAR QUEUE The CLEAR QUEUE message shall be implemented if tagged queuing is implemented and may be implemented if untagged queuing is implemented. The target shall go to the BUS FREE phase following successful receipt of this message. The target shall perform an action equivalent to receiving a series of ABORT messages from each initiator. All I/O processes, from all initiators, in the queue for the specified logical unit or target routine shall be cleared from the queue. All active I/O processes shall be terminated. The medium may have been altered by partially executed commands. All pending status and data for that logical unit or target routine for all initiators shall be cleared. No status or message shall be sent for any of the I/O processes. A unit attention condition shall be generated for all other initiators with I/O processes that either were active or were queued for that logical unit or target routine. When reporting the unit attention condition the additional sense code shall be set to COMMANDS CLEARED BY ANOTHER INITIATOR. For dual port implementations, only I/O processes for the port from which the message was received are affected. No I/O processes are cleared for the other port and no unit attention conditions are generated for initiators on the other port. Previously established conditions, including MODE SELECT parameters, reservations, and extended contingent allegiance shall not be changed by the CLEAR QUEUE message. 5.6.6 COMMAND COMPLETE [No changes.] 5.6.7 DISCONNECT [No changes.] 5.6.8 IDENTIFY The IDENTIFY message (table 5-5) is sent by either the initiator or the target to establish an I_T_L or an I_T_R nexus. For dual port implementations: if the target disconnects from the bus during an I/O process, it shall reconnect through the same port when the I/O process is continued. [No other changes in this section.] 5.6.9 IGNORE WIDE RESIDUE [No changes.] 5.6.10 INITIATE RECOVERY [No changes.] 5.6.11 INITIATOR DETECTED ERROR [No changes.] 5.6.12 LINKED COMMAND COMPLETE [No changes.] 5.6.13 LINKED COMMAND COMPLETE (WITH FLAG) [No changes.] 5.6.14 MESSAGE PARITY ERROR [No changes.] 5.6.15 MESSAGE REJECT [No changes.] 5.6.16 MODIFY DATA POINTER Message [No changes.] 5.6.17 NO OPERATION [No changes.] 5.6.18 Queue Tag Messages [No changes.] 5.6.19 RELEASE RECOVERY [No changes.] 5.6.20 RESTORE POINTERS [No changes.] 5.6.21 SAVE DATA POINTER [No changes.] 5.6.22 SYNCHRONOUS DATA TRANSFER REQUEST Message [No changes.] 5.6.23 TERMINATE I/O PROCESS [No changes.] 5.6.24 WIDE TRANSFER REQUEST Message [No changes.] [Changes needed for section 6:] [There are references in the contingent allegiance, extended contingent allegiance, and asynchronous event notification sections to "other initiators". I think it is clear that this includes initiators on the other port(s) (in dual port implemen- tations) without adding an explicit reference to the other port(s).] 6.9 Unit Attention Condition The target shall generate a unit attention condition for each initiator on each valid logical unit whenever the target has been reset by a BUS DEVICE RESET message, a hard reset condition, or by a power on reset. For dual port implementations, the unit attention condition may affect the initiators on one port or both ports as defined by the type of reset seen. The target shall also generate a unit attention condition on the affected logical unit(s) for each affected initiator whenever one of the following occurs: [No further changes in section 6.9.] [Changes needed for section 7:] 7.1.1.4 Dual Port Option This feature permits an SCSI device to have an additional SCSI interface port. The additional port provides an alternate path through the target to reach the attached logical unit(s). The additional port is usually connected to a different SCSI bus than the first port. In this configuration, a host computer has separate paths (SCSI host adaptor, SCSI bus cable, SCSI connector port on the target) over which it can reach the logical unit(s) attached to the target. The host computer can use the alternate path to reach the desired logical unit if the first path is too busy to get access or if the first path is not functioning properly. This can result in increased I/O performance and/or increased reliability of the overall system. 7.2.5.1 Standard INQUIRY Command The standard INQUIRY data (Table 7-15) contains 36 required bytes, followed by a variable number of vendor-specific parameters. Bytes 56 through 95, if returned, are reserved for future standardization. The standard INQUIRY data format is shown in Table 7-15. Table 7-15: Standard INQUIRY Data Format ============================================================= Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte| | | | | | | | | ============================================================= 0 |Peripheral Qualifier| Peripheral Device Type | ----|-------------------------------------------------------| 1 | RMB | Device Type Modifier | ----|-------------------------------------------------------| 2 | ISO Version | ECMA Version | ANSI-Approv Version| ----|-------------------------------------------------------| 3 | AENC |TrmIOP| Reserved | Response Data Format | ----|-------------------------------------------------------| 4 | Additional Length (n-4) | ----|-------------------------------------------------------| 5 | Reserved | ----|-------------------------------------------------------| 6 | Reserved | Port |DualP | Reserved | ----|-------------------------------------------------------| 7 |RelAdr|WBus32|WBus16| Sync |Linked|DscTrn|CmdQue|SftRe | ----|-------------------------------------------------------| [Remainder of table 7-15 is unchanged.] The Port bit is only defined when the DualP bit is set to one. In this case a Port bit of zero indicates that the current nexus connects to port A and a Port bit of one indicates that the current nexus connects to port B. When the DualP bit is zero, the Port bit must also be zero. A Dual Port (DualP) bit of one indicates that this is a dual port device and conforms to the dual port requirements in this standard. A value of zero indicates that this device has a single port and doesn't implement the dual port requirements. 7.2.8 MODE SELECT(6) Command [Table 7-22 is unchanged] The MODE SELECT(6) command (Table 7-22) provides a means for the initiator to specify medium, logical unit, or peripheral device parameters to the target. Target that implement the MODE SELECT command shall also implement the MODE SENSE command. Initiators should issue MODE SENSE prior to MODE SELECT to determine supported pages, page lengths, and other parameters. If a target supports saved pages, it may save only one copy of the page for each logical unit and have it apply to all initiators or it may save separate copies for each initiator for each logical unit. Dual port implementations may save one copy per logical unit and have it apply to all initiators on both ports or save a separate copy per logical unit for each initiator on each port. If separate copies are saved, the target shall maintain separate current values for each I_T_L nexus. Pages which are common to all initiators are not required to have multiple copies. If an initiator sends a MODE SELECT command that changes any parameters that apply to other initiators, the target shall generate a unit attention condition for all initiators except the one that issued the MODE SELECT command (see 6.9). The target shall set the additional sense code to MODE PARAMETERS CHANGED. The target may provide for independent sets of parameters for each attached logical unit or for each combination of logical unit and initiator. If independent sets of parameters are implemented, and a third party reservation is requested the target transfers the set of parameters in effect for the initiator of the RESERVE command to the parameters used for commands from the third party device (see 8.2.12.3 and 9.2.10.1). [No other changes needed in section 7.2.8.] [Changes needed for section 8:] 8.2.12 RESERVE Command [Table 8-25 is unchanged] The RESERVE and RELEASE commands provide the basic mechanism for contention resolution in multiple-initiator systems. The RESERVE command (Table 8-25) is used to resolve a logical unit or, if the extent reservation is implemented, extents within a logical unit. The third party reservation allows logical units or extents to be reserved for another specified SCSI device. IMPLEMENTORS NOTE: The reservation queuing option in X3.131-1986 has been removed from SCSI-2. 8.2.12.1 Logical Unit Reservation (Mandatory). If the extent bit is zero, this command shall request that the entire logical unit be reserved for the exclusive use of the initiator until the reservation is superseded by another valid RESERVE command from the initiator that made the reservation or until released by a RELEASE command from the same initiator that made the reservation, by a BUS DEVICE RESET message from any initiator on the same port, by a BUS DEVICE RESET OTHER PORT message from any initiator on the other port, by a hard reset condition, or by a power on cycle. A logical unit reservation shall not be granted if the logical unit or any extent is reserved by another initiator. If the extent bit is zero, the reservation identification and the extent list length shall be ignored. If the logical unit, or any extent within the logical unit, is reserved for another initiator, the target shall return RESERVATION CONFLICT status. If, after honoring the reservation, any other initiator attempts to perform any command on the reserved logical unit other than an INQUIRY, REQUEST SENSE, ALLOW MEDIUM REMOVAL, RESERVE, or RELEASE command then the command shall be rejected with RESERVATION CONFLICT status. For dual port implementations, devices on the other port (i.e., the port that does not include the initiator to which a reservation has been granted) shall also be denied access to the logical unit as described in the preceding paragraph. [No other changes needed in section 8.2.12] [Changes needed for section 9:] 9.2.10 RESERVE UNIT Command [Table 9-13 is unchanged.] The RESERVE and RELEASE commands provide the basic mechanism for contention resolution in multiple-initiator systems. The RESERVE command (Table 9-13) is used to reserve logical units for the exclusive use of the requesting initiator or, if it is a third party reservation, to another specified SCSI device. This command requests that the entire logical unit be reserved for the exclusive use of the initiator until the reservation is superseded by another valid RESERVE UNIT command from the initiator that made the reservation or until released by a RELEASE UNIT command from the same initiator that made the reservation, by a BUS DEVICE RESET message from any initiator on the same port, by a BUS DEVICE RESET OTHER PORT message from any initiator on the other port, by a hard reset condition, or by a power on cycle. The reservation shall not be granted if the logical unit is reserved to another initiator. It shall be permissible for an initiator to reserve a logical unit that is currently reserved by that initiator. If the logical unit is reserved to another initiator, the target shall return RESERVATION CONFLICT status. If, after honoring the reservation, any other initiator attempts to perform any command on the reserved logical unit other than an INQUIRY, REQUEST SENSE, ALLOW MEDIUM REMOVAL, RESERVE, or a RELEASE UNIT command, the command shall be rejected with RESERVATION CONFLICT status. For dual port implementations, devices on the other port (i.e., the port that does not include the initiator to which a reservation has been granted) shall also be denied access to the logical unit as described in the preceding paragraph. [No other changes needed in section 9.2.10]