Date: July 25, 1990 X3T9.2/90-120 Rev 0 To: X3T9.2 Committee (SCSI) From: George Penokie (IBM) Subject: Response to the request for Interpretation on the procedures to use when doing logging operations The following description is not meant to replace the descriptions of the Log Select command, Log Sense command, or the Log Parameters sections in the SCSI-2 standard. Rather it is to be used in addition to those sections to help gain a more uniform implementation across products supporting the logging functions. Nothing in this description conflicts with the current SCSI-2 standards descriptions of the logging function. Glossary List Parameter - A string of ASCII graphic codes Log Page - A page made up of one or more Log Parameters Log Parameter - Log information which is made up of a Parameter Code, a Parameter Control Byte, and a Parameter Value. Parameter Code - A unique identifier which is used to distinguish between the different Log Parameters within a single Log Page. Parameter Control Byte - Used to tell the target how to update, save, use thresholds, determine format, etc. of the Parameter Value. Parameter Pointer Field - Contains a Parameter Code Parameter Value - A counter, cumulative, threshold, or ASCII value. NV - Not Valid x - The value of the bit is not relevant Log Sense Command The Log Sense command may be used to do two functions: One is to allow the target to save the Log Parameters in a Log Page to non-volatile storage. The other is to allow the initiator to receive the value of the current Log Parameters for a given Log Page. The following lists the possible Parameter Values which can be returned: Log Page Parameter Log Sense CDB Control Values Byte Value Target Action PPC PC LP Parameter Values returned to the Bit Field Bit Initiator 0 00 0 Returns all Current Threshold Values starting with the specified Parameter Pointer 0 01 0 Returns all Current Cumulative Values starting with the specified Parameter Pointer 0 10 0 Returns all Default Threshold Values starting with the specified Parameter Pointer 0 11 0 Returns all Default Cumulative Values starting with the specified Parameter Pointer 1 00 0 Returns only the Current Threshold Values which have changed starting with the specified Parameter Pointer 1 10 0 Returns only the Current Cumulative Values which have changed starting with the specified Parameter Pointer 1 01 0 Returns only the Default Threshold Values which have changed starting with the specified Parameter Pointer 1 11 0 Returns only the Default Cumulative Values which have changed starting with the specified Parameter Pointer 0 xx 1 Returns all the List Parameters starting with the specified Parameter Pointer 1 xx 1 Returns only the List Parameters which have changed starting with the specified Parameter Pointer The following lists the possible save options for both the Log Sense Command and the Log Select Command: Log Page Log Sense Parameter CDB Control Values Byte Value Target Action SP DS Bit Bit 0 0 Do not save any of the Log Parameters into non-volatile storage 1 0 Save all the Log Parameters for the selected Log Page into non-volatile storage 0 1 Do not save any of the Log Parameters into non-volatile storage 1 1 Do not save any of the Log Parameters into non-volatile storage Log Select Command One function of the Log Select command is to allow the initiator a method of sending parameter values to the target. The following lists the possible Parameter Values which can be controlled: Log Page Log Sense Parameter CDB Control Values Byte Value Target Action PC LP Field Bit Updated Parameter Value Usage 00 0 The Parameter Values for all the Log Parameters in the Log Page(s) sent to the target shall be used as Threshold Values, unless the LP bit is set 01 0 The Parameter Values for all the Log Parameters in the Log Page(s) sent to the target shall be used as Cumulative Values, unless the LP bit is set 10 0 The target shall set the Current Threshold Values to the Default Threshold Values for all the Log Parameters specified in the Log Page(s) sent during a Log Select command, unless the LP bit is set 11 0 The target shall set the Current Cumulative Values to the Default Cumulative Values for all the Log Parameters specified in the Log Page(s) sent during a Log Select command, unless the LP bit is set xx 1 Replace the Current List Parameter with the List Parameter sent to the target Logging Operations The logging operations can be setup to keep track of many different things. What those things are is left up to the imagination of implementers. But what should be well defined is how a target informs the initiator when a log reaches a critical point thereby creating an exception condition. What follows is a description of how the target shall deal with these exception conditions. Control Log Page Parameter Mode Page Control Byte Values (0Ah) Target Action DU ETC TMC LP RLEC Bit Bit Field Bit Bit Exception Condition Actions x x xx x 0 No logging activities will cause a Contingent Allegiance Condition or a Unit Attention Condition 0 1 xx 0 1 IF the threshold condition as defined by the TMC field is met a)IF there is an active I/O process a)Complete the active I/O process b)If a Contingent Allegiance Condition exists wait for it to be cleared END b)Issue a Unit Attention Condition to all Initiators c)IF the Unit Attention Condition is ignored a)Continue normal operations until the threshold condition is met again END END DU ETC TMC LP RLEC Bit Bit Field Bit Bit Exception Condition Actions 0 0 NV 0 1 IF a log counter reaches its maximum value 1 a)Set DU to 1 b)IF there is no active I/O process a)Wait until there is an active I/O process END c)Complete the active I/O process d)IF no Contingent Allegiance Condition exists a)Create a Contingent Allegiance Condition with a sense key of Recovered Error and an ASCQ of Log Exception, Count At Maximum END e)Wait for the Contingent Allegiance Condition to be cleared f)IF the cause of the counter reaching maximum is not cleared by the Initiator a)Create a Contingent Allegiance Condition every time the counter should be incremented. END END DU ETC TMC LP RLEC Bit Bit Field Bit Bit Exception Condition Actions 0 0 00 1 1 IF the log of parameters is full a)Place the new log parameter code value into the lowest parameter code value position (wrap-around the parameter codes) b)IF there is no active I/O process a)Wait until there is an active I/O process END c)Complete the active I/O process d)IF no Contingent Allegiance Condition exists a)Create a Contingent Allegiance Condition with a sense key of Recovered Error and an ASCQ of Log Exception, List Codes Exhausted END e)Wait for the Contingent Allegiance Condition to be cleared f)IF the cause of the log of parameters filling is not cleared by the Initiator a)Create a Contingent Allegiance Condition every time an entry is placed into the log of parameters END END