X3T9.2/89-047 NCR Corporation ______________________________________________________________________________ Date: April 11, 1989 To: X3T9.2 Membership From: John B. Lohmeyer, NCR Principal Member of X3T9.2 Subject: Overriding Device Reservations and Pending Commands Currently SCSI-2 has not defined a convenient mechanism for a multiple initiator system to gracefully take over execution from a failed initiator. When an initiator fails, it may have outstanding device or extent reservations and it may have pending I/O processes. These outstanding reservations must be broken and the pending I/O processes must be aborted in order for a backup initiator to take over the processing activity. Short of issuing a BUS DEVICE RESET message, which clears entirely too much, SCSI does not define a means for the backup initiator to clear the outstanding reservations and I/O processes. Temporarily switching its SCSI ID has been suggested, but is not practical in many cases -- many host adapters do not make this programmable. Besides, what if the failed initiator wakes up at the wrong time? I am proposing that we add a LOGICAL UNIT RESET message that would permit one initiator to clear all outstanding device reservations and pending I/O processes on behalf of another presumably failed initiator (how it determines this is beyond the scope of the proposal). The following three pages show how this proposal would affect the document. Additions are shown with a change bar in the left margin. cc: Ray Regenthal Table 5-2: Message Codes ============================================================================== Code Support Message Name Direction Negate ATN Init Targ Before last ACK ------------------------------------------------------------------------------ 06h O M ABORT Out Yes 0Dh O O ABORT TAG Out Yes 0Ch O M BUS DEVICE RESET Out Yes 0Eh O O CLEAR QUEUE 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 (Two Bytes) In --- 0Fh O O INITIATE RECOVERY In Out Yes 05h M M INITIATOR DETECTED ERROR Out Yes 0Ah O O LINKED COMMAND COMPLETE In --- 0Bh O O LINKED COMMAND COMPLETE (WITH FLAG) In --- | 24h O O LOGICAL UNIT RESET Out Yes 09h M M MESSAGE PARITY ERROR Out Yes 07h M M MESSAGE REJECT In Out Yes *** O O MODIFY DATA POINTER In --- 08h M M NO OPERATION Out Yes Queue Tag Messages (Two 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 12h - 1Fh Reserved 24h - 2FH Reserved for two-byte messages 30h - 7Fh Reserved ============================================================================== Key: M = Mandatory support, O = Optional support. In = Target to initiator, Out = Initiator to target. Yes = Initiator shall negate ATN before last ACK of message. No = Initiator may or may not negate ACK before last ACK of message. (see attention condition, 5.2.1.) --- = Not Applicable *** = Extended message (see Tables 5-3 and 5-4) 80h+ = Codes 80h through FFh are used for IDENTIFY messages 5.6.1. ABORT The ABORT message is sent from the initiator to the target to clear the present I/O process plus any queued I/O process for the I_T_x nexus. The target shall go to the BUS FREE phase following successful receipt of this message. Pending data, status, and queued I/O processes for any other I_T_x nexus shall not be cleared. If only an I_T nexus has been established, the target shall go to the BUS FREE phase. No status or message shall be sent for the I/O process and the I/O process queue shall not be affected. It is not an error to issue this message to an I_T_x nexus that does not currently have an active or queued I/O process. Transmission of this message shall terminate any extended contingent allegiance condition that may exist between the I_T_x nexus. IMPLEMENTORS NOTES: | (1) The BUS DEVICE RESET, LOGICAL UNIT RESET, CLEAR QUEUE, ABORT, and ABORT TAG messages provide a means to clear one or more I/O processes prior to normal termination. The BUS DEVICE RESET message clears all I/O processes for all initiators on all logical units of the target. The LOGICAL UNIT | RESET message clears all I/O processes for a specified initiator on the | identified logical unit of the target. This message also clears any device | reservations. The CLEAR QUEUE message clears all I/O processes for all initiators on the specified logical unit of the target. The ABORT message clears all I/O processes for the selecting initiator on the specified logical unit of the target. The ABORT TAG message clears the current I/O process only. (2) It is permissible for an initiator to select a target that is currently disconnected for the purpose of sending one of the above message sequences. | 5.6.__. LOGICAL UNIT RESET | | Table 5-__: LOGICAL UNIT RESET Message Format | | ============================================================================== | Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | | Byte | | | | | | | | | | ============================================================================== | 0 | Message Code (24h) | | -----|-----------------------------------------------------------------------| | 1 | Reserved | Initiator Device ID | | ============================================================================== | | | The LOGICAL UNIT RESET message (Table 5-__) requests that the target clear | all I/O processes and all reservations on the I_T_x nexus for the specified | initiator. This message shall be sent immediately following the IDENTIFY | message. If the target implements this message, it shall go to the BUS FREE | phase after clearing all I/O processes and all device reservations for the | initiator specified in the initiator device ID field. If the target does not | implement this message, it shall respond with MESSAGE REJECT message as | described in 5.6.14. | | If the initiator specified in the initiator device ID field selects the | target again subsequent to the LOGICAL UNIT RESET message and prior to a power | on, a hard reset condition, or a BUS DEVICE RESET message to the target, the | target shall return CHECK CONDITION status and shall set the sense key to UNIT | ATTENTION. The additional sense code shall be set to LOGICAL UNIT RESET | OCCURRED. | | The effect of this message shall be the same as if the specified initiator | had issued a CLEAR QUEUE message to the I_T_x nexus followed by a RELEASE or | RELEASE UNIT command, whichever is appropriate for the device type. No status | is sent to either initiator. | | IMPLEMENTORS NOTE: This message is intended for use in multiple initiator | applications when an initiator determines (through some application-specific | means) that another initiator has failed. [The LOGICAL UNIT RESET OCCURRED is a new ASC. I recommend using 29 01 for its code. Alternatively, we could use POWER ON, RESET, OR BUS DEVICE RESET OCCURRED, but it is not as descriptive.]