.fo off .pl 63 .tm 0 .bm 0 Date: July 25, 1990 X3T9.2/90-120 Rev 1 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 .pa 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 definitions of the Log Sense CDB fields: Log Sense CDB Values PPC SP PC Bit Bit Field Description 0 - -- Indicates that the log parameter requested from the target shall begin with the parameter code specified by the allocation length field in ascending order of parameter codes from the specified log page. 1 - -- Indicates that the target shall return a log page consisting only of the log parameters in which a log parameter value has changed since the last LOG SELECT or LOG SENSE command. The target shall return only those log parameters following the parameter pointer field. - 0 -- Indicates the target shall perform the specified LOG SENSE command and shall not save any log parameters. - 1 -- Indicates that the target shall perform the specified LOG SENSE command and shall save all log parameters identified as savable by the DS bit to a non-volatile vendor-specific location if allowed. (See the list below to determine the interaction between the SP and DS bits to see what 'allowed' means) - - 00 Indicates the target shall return the Current Threshold Values. - - 01 Indicates the target shall return the Current Cumulative Values. - - 10 Indicates the target shall return the Default Threshold Values. - - 11 Indicates the target shall return the Default Cumulative Values. .pa 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 .pa The following lists the possible save options for both the Log Sense Command and the Log Select Command: Log Page Parameter CDB Control Values Byte Value Target Action SP PC DS Bit Field Bit 0 xx 0 Do not save any of the Log Parameters into non-volatile storage 1 00 0 Save all the Current Threshold Values (LOG SENSE) or all the Threshold Values (LOG SELECT) of the selected Log Page into non-volatile storage 1 01 0 Save all the Current Cumulative Values (LOG SENSE) or all the Cumulative Values (LOG SELECT) of the selected Log Page into non-volatile storage 1 10 0 Save all the Default Threshold Values of the selected Log Page into non-volatile storage 1 11 0 Save all the Default Cumulative Values of the selected Log Page into non-volatile storage 0 xx 1 Do not save any of the Log Parameters into non-volatile storage 1 xx 1 Do not save any of the Log Parameters into non-volatile storage .pa 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 definitions of the Log Select CDB fields: Log Select CDB Values Parameter PCR SP PC List Bit Bit Field Length Description 0 - -- - Indicates that the log parameters shall not be reset. 1 - -- 0000h Indicates the target shall set all implemented parameter values to the target-defined default values. 1 - -- GT 0 An illegal condition. - 0 -- - Indicates the target shall not save any of of the log parameters. - 1 -- - Indicates that after performing the specified LOG SELECT operation the target shall save to non-volatile memory all savable log parameters. (See the list above to determine the interaction between the SP and DS bits to see what 'savable' means) - - 00 - Indicates the initiator shall send Threshold Values. - - 01 - Indicates the initiator shall send Cumulative Values. - - 10 - Indicates the initiator shall send Default Threshold Values. - - 11 - Indicates the initiator shall send Default Cumulative Values. .pa 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 .pa 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. The following lists the definitions of the Parameter Control Byte of the Log Parameter: Parameter Control Byte values DU DS TSD ETC TMC LP Bit Bit Bit Bit Field Bit Description 0 - - - -- - Indicates that the target shall update the log parameter value to reflect all events that should be noted by that log parameter. 1 - - - -- - Indicates that the target shall not update the log parameter value except in response to a LOG SELECT command that specifies a new value the log parameter. - 0 - - -- - Indicates that the target supports saving for of the log parameter. - 1 - - -- - Indicates the target does not support saving of the log parameter in response to a LOG SELECT or LOG SENSE command. - - 0 - -- - Indicates that the target provides a target-defined method of saving log parameters. - - 1 - -- - Indicates that either the target does not provide a target-defined method for saving log parameters or the target- defined method has been disabled by the initiator. - - - 0 -- - Indicates that a comparison between the threshold value and the cumulative value is not performed. - - - 1 -- - Indicates that a comparison to the threshold value is performed whenever the cumulative value is updated - - - - 00 - Indicates the target shall inform the initiator on every update to the cumulative value. .pa - - - - 01 - Indicates the target shall inform the initiator every time the cumulative value is equal to the threshold value. - - - - 10 - Indicates the target shall inform the initiator every time the cumulative value is not equal to the threshold value. - - - - 11 - Indicates the target shall inform the initiator every time the cumulative value is greater than the threshold value. - - - - -- 0 Indicates the log parameter is a data counter. - - - - -- 1 Indicates the log parameter is a list parameter. .pa What follows is a description of how the target shall deal with 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 x 1 xx 1 x An illegal 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 .pa 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 .pa 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