DATE: Sept. 10, 1991 document X3T9.2/91-149 R0 TO: X3T9.2 Committee (SCSI) FROM: Gerry Houlder (Seagate) SUBJECT: Extensions for dual port SCSI (again) Some problems have been identified with my previous dual port proposal (90-136R3). This document proposes changes to fix the perceived problems. One major conceptual change (RESET doesn't affect the other port) and a new command are are needed for market acceptance of dual port SCSI. New changes are shown with a change bar in column 1. The issues are: |- Define effect of SCSI bus RESET condition. (RESET on one port |does not affect the other port except possibly to create "MODE |parameters changed by other initiator" sense bytes.) - 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 and extended contingent allegiance. (The other port should get lumped in with the "other initiators".) |- Define effect on unit attention condition. (Unit attention due |to SCSI RESET is not generated for the other port. Other unit |attention conditions lump the other port 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.) |- Add new command for dual port that allows enabling/disabling |other port, overriding reservation held by other port, and |returning status about other port. Status includes if other port |is enabled/disabled and if other port has an active reservation. Editorial comments are enclosed in brackets []. Added text is underlined and deleted text is overstruck. [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 only apply |the hard reset to the port on which the reset was received. In |this case all I/O processes for the other port are unaffected, |reservations granted to initiators on that port are not released, |operating modes for the other port are not changed, and unit |attention is not set for any initiators on the other port. If |MODE SELECT parameters affecting the other port are changed, unit |attention may be set as described in 7.2.8. 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 11h O O TERMINATE I/O PROCESS Out Yes *** O O WIDE DATA TRANSFER REQUEST In 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 and may be implemented of untagged 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. On a reconnection, the ABORT TAG message aborts the current I/O process if it is fully identified. If the I/O process is not fully identified (i.e., an I_T_L nexus exists, but the target is reconnecting for an I_T_L_Q nexus), then the I/O process is not aborted and the target goes to BUS FREE phase. 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 BUS DEVICE 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, reservations, and operationg modes |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 for hard reset condition, BUS DEVICE RESET |message, and BUS DEVICE RESET OTHER PORT message only affects the |initiators on one port as described in sections 5.2.2.1, 5.6.3, |and 5.6.4. The target shall also generate a unit attention |condition on the affected logical unit(s) for each affected initiator whenever one of the following events 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 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.] |.2.x PORT STATUS Command | Table 7-xx: PORT STATUS Command ============================================================= Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte| | | | | | | | | ============================================================= 0 | Operation Code (xxh) | ----|-------------------------------------------------------| 1 | Logical Unit Number| Reserved |DisOP | EnOP | PR | ----|-------------------------------------------------------| 2 | Reserved | ----|-------------------------------------------------------| 3 | Reserved | ----|-------------------------------------------------------| 4 | Allocation Length | ----|-------------------------------------------------------| 5 | Control | ============================================================= |he PORT STATUS command (Table 7-xx) provides a way for the |initiator to do functions concerning the other port on dual port |targets and to return status concerning the other port. This |command is mandatory if the dual port option is implemented. |The Disable Other Port (DisOP) and Enable Other Port (EnOP) bits |are used to control enabling of the other port as follows: |DisOP EnOP |----- ---- | 0 0 No change in condition of other port | 0 1 Enable the other port | 1 0 Disable the other port | 1 1 Illegal bit combination |When the other port is disabled, the target does not respond to |selection from any initiator on that port. When it is enabled |the target responds normally to selection attempts. |A Priority Reservation (PR) bit of one requires the target to |supercede any existing reservation to any initiator on either |port with a logical unit reservation to this initiator. This |action precedes any other actions defined for this command. A PR |bit of zero indicates that the DisOP and EnOP functions are |prevented if a conflicting reservation exists, but the port |status data will still be returned and this command will still |end with GOOD status. |The Allocation Length specifies the number of bytes that has been |allocated for returned PORT STATUS data. An allocation length of |zero indicates that no PORT STATUS data is transferred. This |condition is not considered as an error. Any other value |indicates the maximum number of bytes that shall be transferred. |The target will terminate the DATA IN phase when Allocation |Length bytes have been transferred or when all available data has |been transferred, whichever is less. | Table 7-xx: PORT STATUS data ============================================================= Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte| | | | | | | | | ============================================================= 0 | Data Length | ----|-------------------------------------------------------| 1 | PAR | Reserved | OPE | ----|-------------------------------------------------------| 2 | RID | ----|-------------------------------------------------------| 3 | Reserved | ============================================================= |An Other Port Enabled (OPE) bit of zero indicates that the other |port is not enabled. An OPE bit of one indicates that the other |port is currently enabled. |The Port with Active Reservation (PAR) field identifies which |port the initiator with an active reservation is attached to. |Bit 7 Bit 6 |----- ----- | 0 0 No reservation is active | 0 1 Reservation is owned by initiator on this port | 1 0 Reservation is owned by initiator on other port | 1 1 Illegal bit combination |The Reservation ID (RID) field indicates the SCSI ID of the |initiator that owns the active reservation. When the PAR field |indicates that no reservation is active, this field shall be |ignored. [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 reserve a logical unit or, if the extent reservation option 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: |a) superceded by another valid RESERVE command from the initiator |that made the reservation, |b) released by a RELEASE command from the same initiator that |made the reservation, |c) released by a BUS DEVICE RESET message from any initiator on |the same port as the initiator that made the reservation, |d) released by a BUS DEVICE RESET OTHER PORT message from any |initiator on the other port from the initiator that made the |reservation, |e) released by a hard RESET condition from any initiator on the |same port as the initiator that made the reservation, |f) released by a power on cycle, |g) superceded by a PORT STATUS command with priority reserve |option. A logical unit reservation shall not be granted if the logical unit or any extent is reserved by another initiator. It shall be permissible for an initiator to reserve a logical unit that is currently reserved by that 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, PREVENT ALLOW MEDIUM REMOVAL (with a |prevent bit of 1), PORT STATUS, 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 other sections:] The RESERVE command for all other device types needs to be changed in the same manner as shown for section 8.2.12.