SCSI Cookbook 8/16/93 Rev 1.0 Author: Lew MacAdam CAPNET::MACADAM MCS Product Management Group PREFACE This document is intended to support field engineers by supplying information that will help in analyzing, isolating and correcting problems with SCSI devices and subsystems. It assumes that the field engineer is familiar with storage subsystems and has generic knowledge of storage concepts. It also assumes familiarity with operating systems such as VMS and ULTRIX and related field tools such as ERF. The document does not assume any specific knowledge of SCSI. It provides generic SCSI information only as needed to understand symptoms and common failures that may be encountered in the field. The Cookbook does NOT provide product or subsystem specific information and it is NOT intended to teach bus theory, communications protocol or details of individual commands. NOTE: IF YOU ARE TRYING TO ANALYZE DEVICE REPORTED INFORMATION IN A SPECIFIC ERROR LOG ENTRY YOU MAY WANT TO GO DIRECTLY TO SECTION 6.2.1 TO GET STARTED. This guide is based on the knowledge and experience gained by the author over the past four years working with SCSI peripherals and subsystems, product developers and the field organization. The goal is that this will be a "living" document that will be improved and updated as time allows and as new information and inputs become available. Your feedback will help to make this a better and more useful document. Please send any suggestions or comments to me at: CAPNET::MACADAM ACKNOWLEDGMENTS: The author would like to recognize and thank Steve Piazza for his contributions in support of this project. I would also like to thank the many folks who took the time to review and give feedback on this document. Your effort has helped make this a more understandable and useful document. 1.0 SCSI General description SCSI (Small Computer System Interconnect) is an architecture defined in an ANSI standard that describes a bi-directional I/O bus. SCSI devices are intelligent devices which reduce the overhead burden on the host system. There are three standard implementations of SCSI; SCSI-1, SCSI-2, and in the works, SCSI-3. Most of the products you will see today are SCSI-2 compliant. There is the standard 8 bit bus and 16 or 32 bit buses which are sometimes referred to as "Wide SCSI". SCSI devices are daisy chained together using a number of different cable configurations. The cable connectors for SCSI-1 and SCSI-2 are 50-pin and 68-pin for wide SCSI. There are unshielded, flat (typically used inside cabinets) and shielded, round (typically used external to cabinets) versions of each of the cable types. The SCSI bus supports up to 8 device IDs. All the devices on the bus have unique ID's (0 through 7) which are usually set by jumpers or switches. All SCSI buses have an adapter (usually set to ID 7) that connect the bus to the host system. The adapter can be integrated onto the system's motherboard, be a separate PCB plugged into the system bus, or may even be a PCB that interfaces to another bus, i.e., CI, BI, or Unibus. Some SCSI adapters are utilized in large storage controllers or connect directly to high speed data buses. There are two electrical types of SCSI buses, Single-Ended (uses TTL logic levels) and Differential. The single ended bus has a physical length limit of 6 meters and is usually used in the asynchronous mode of operation. This is the most common and cheapest application. Some new storage devices are utilizing both asynchronous and synchronous transfers on the single ended bus to improve performance. The differential bus supports a cable length of 25 meters and can be operated in both asynchronous and synchronous modes. A standard 8 bit single ended SCSI bus running in asynchronous mode can transfer data up to 5 MB/second while a differential 8 bit or 16 bit (wide) SCSI bus running in synchronous (fast) mode can transfer data up to 20 MB/second. Devices that can operate in synchronous mode are called "Fast" SCSI devices. To communicate in synchronous mode any two devices must agree to run in synchronous mode as part of a negotiation process between the two devices. If this negotiation does not occur or fails, the default is to run in the asynchronous (slower) mode. The SCSI bus must be terminated at both physical ends of the bus. Termination can be made either on the device or at the end of the cable. The typical implementation on devices is via 3 Single In-Line Pin resistor packs (SIPs). The sockets for these SIPs are usually found near the device's SCSI cable connector. There are two types of termination, active and passive. Passive is the most common and cheapest method of termination. Active termination is used to improve signal quality. Active terminators are more expensive and less commonly used. Active termination is more commonly implemented in higher end storage subsystems. 2.0 Differences in SCSI Device Implementations The primary objective of the SCSI interface is to provide host computers with device independence within a class of devices. The result is that different disk drives, tape drives, printers, optical media drives, and other devices can be added to the host computers without requiring modifications to generic system hardware or software. There may be significant differences between two SCSI devices even though both devices conform to the standard. The philosophy of the ANSI SCSI standard is to define the minimum set of rules to which a device must conform in order to guarantee that the device will communicate and function correctly with other conforming SCSI devices. Whenever possible the standard is written to allow device designers maximum flexibility when implementing SCSI for a specific product. SCSI is analogous to an electrical code in the building industry. It defines certain standards and rules that must be followed in doing specific things but it does not require that all features defined in the standard be implemented and it does not typically specify details of how a given feature or function must be implemented beyond those required to ensure that different devices can function properly together in a SCSI subsystem. 3.0 The Intelligence is in the Device In SCSI devices, the "intelligence" required to control and operate the device is embedded in each device in the form of an embedded peripheral controller. All device-dependent operations are handled at the device level by the embedded controller. This approach allows system designers to create universal SCSI hardware and software for a class of devices (i.e. disk, tape, media loader etc.) that can communicate with any SCSI device in that class. The SCSI command set is designed to allow sophisticated operating systems to obtain and manage device information required to allow the operating system to work with attached SCSI devices. Device parameters and operations that are not needed by the operating system are managed by the SCSI device itself and are not controllable via the SCSI interface. 4.0 The SCSI Bus 4.1 Logical layer Up to eight SCSI devices can be attached to the bus. Each device has a unique SCSI ID assigned to it. SCSI allows each device to have up to seven logical unit numbers (LUNs) attached to it. In actual practice, except in RAID subsystems, there is usually only a single logical unit (LUN 0) at any given SCSI device ID. RAID subsystems often implement separate SCSI buses on the host side and device side of an array controller. In these subsystems, LUN designations in the host side SCSI bus layer may be used to reference devices or groups of devices on different SCSI buses on the device side of the array controller. There are two general device models for a SCSI device; Initiator and Target. An Initiator is a SCSI device capable of initiating an operation. An Initiator is usually an adapter/controller in the host system that adapts the host system bus to the SCSI bus and communicates with attached SCSI peripherals. A Target is a SCSI device capable of responding to a request to perform an operation. Targets are typically peripheral devices such as disks, tapes or printers that service host system requests. A SCSI device usually has a fixed role as an Initiator or Target. There can be any combination of Initiators and Targets in a SCSI subsystem provided there is at least one of each. All transactions on the SCSI bus are between two devices at a time; one, an Initiator, the other, a Target. 4.2 The Physical Bus 4.2.1 SCSI Bus Signals The physical SCSI bus is a parallel interconnect that consists of 18 signals. Nine signals are used to transfer information bytes (data and messages) and nine are used to control the bus. The SCSI standard also defines an optional method for implementing wide 16 and 32 bit data buses by increasing the number of data lines on the bus. In actual practice only the 8 bit and 16 bit options have been implemented as of July 1993. The most common implementation of the SCSI bus provides an eight bit wide data path and uses the single ended driver configuration. In this 8 bit single ended configuration nine lines are used to represent eight data bits and one parity bit and additional lines are used to represent signal ground. These data signals and parity are used to transfer messages, commands, status, and data between devices on the bus. During these operations, data parity on the bus is odd. The eight data lines on the bus are also used by individual devices to arbitrate for the bus during the Arbitration phase. During arbitration parity is undefined and not valid. Reference section 5.2 for further information on arbitration. 4.2.2 Single-ended vs Differential Drivers Signals on the SCSI bus may assume true or false values. There are two methods of driving these signals. In both cases, the signal is actively driven true, or asserted. The two different bus signal driver/receiver designs currently used in SCSI subsystems are called "Single-ended" and "Differential". 4.2.2.1 Single Ended Alternative In "Single-ended" SCSI, the logical level of a bus signal is defined by its voltage level with reference to ground. The signal is "high" if its voltage level is over +2.5 volts DC and "low" if its voltage level is less than 0.4 volts DC. Single-ended SCSI is "active low". This means that a logical one is represented by the low voltage level and a logical zero is represented by the high voltage level. 4.2.2.2 Differential Alternative In Differential SCSI, the bus signals and their usage is the same but each signal is defined by a pair of physical lines denoted +SIGNAL and -SIGNAL. The logical value of a signal, one or zero, is determined by the voltage difference between the signal lines. A signal is true when +SIGNAL is more positive than -SIGNAL, and a signal is false when -SIGNAL is more positive than +SIGNAL. 4.2.2.3 Single-ended and Differential Alternatives are Mutually Exclusive The Single-ended and Differential alternatives are mutually exclusive on the same physical bus. Devices, adapters and terminators for the two different signal driver designs can NOT be mixed on the same physical SCSI bus. A number of adapters available on the market can be used to convert Single-ended SCSI to Differential and Differential SCSI to Single-ended. A number of lines that are actively driven in Differential SCSI are used as signal ground in Single-ended configurations. Differential SCSI uses a signal called DIFFSENS to avoid damage to the Differential drivers if a Single-ended device or terminator is mistakenly connected to a Differential configuration. The DIFFSENS signal is normally high and when in this state it enables the Differential drivers. If this signal is pulled to ground, as it would be if a Single-ended device or terminator was mistakenly connected, the Differential drivers are disabled. 4.2.3 Maximum allowable physical bus lengths The maximum allowable cable length for Single-ended drivers and receivers is six meters (about 19 feet). Single-ended SCSI was designed primarily for connection within an enclosure. The use of Single-ended drivers and receivers with fast synchronous data transfer is not recommended. The maximum allowable cable length for Differential drivers and receivers is 25 meters. Both ends of the bus must be terminated. 4.2.4 SCSI Bus Cabling All SCSI devices in the field today are daisy-chained together using either 50-conductor and/or 68-conductor cable. The majority of subsystems currently use 50-conductor cable and support an eight bit wide data path using Single-ended drivers. A small proportion of devices and subsystems have implemented the 16-bit bus. The cable configuration used in these designs is a single 68-conductor cable. The ANSI SCSI standards organization is documenting this 68-conductor single cable solution and it will be defined in the SCSI-3 standard. 50-conductor and 68-conductor cable can be mixed in a subsystem but obviously two devices will only be able to transfer data in 16-bit mode where 68-conductor cables are used in all interconnections between the two devices. 4.2.5 Bus Termination 4.2.5.1 What is Termination?/ What does it do? A resistor network on each signal line presents a constant impedance to the SCSI bus. This resistor network is supplied with +5 volts DC from the SCSI bus TERMPWR line. The other side of the network is tied to bus ground. The signal lines are connected to the network so that they will be forced to the non-asserted or logical zero state when not being driven. There are two types of termination, active and passive. Passive is the most common and cheapest method of termination. Active termination is used to improve signal quality. Active terminators are more expensive and less commonly used. Active termination is more commonly implemented in higher end storage subsystems. Single-Ended and Differential terminators use different values of resistors within the their signal terminating resistor networks and are electrically incompatible with each other. 4.2.5.2 Terminator Power Terminators require power which must be supplied to the SCSI bus from at least one device on the bus. SCSI is designed to work properly provided that at least one device is supplying TERMPWR to the bus TERMPWR line. Any SCSI device may supply terminator power. Most SCSI devices have jumpers or switches to enable/disable terminator power and are capable of supplying TERMPWR provided that these jumpers or switches are properly configured. SCSI-2 Initiators (Host Adapters) are required to supply TERMPWR. The SCSI-1 standard did not define a required source for TERMPWR. INTERFACE ERROR RATES ARE LOWER IF TERMINATION VOLTAGE IS SUPPLIED BY THE DEVICES AT THE ENDS OF THE BUS. NOTE: SCSI recommends the use of keyed connectors in SCSI devices that provide terminator power to prevent accidental grounding or the incorrect connection of terminator power if a cables is installed upside down (flipped). Since keyed connectors are not REQUIRED, care should be used when configuring and replacing SCSI devices. 4.2.5.3 Terminator Physical Location The SCSI bus requires termination at each end of the cable in order to ensure proper operation. Bus termination may be internal to the SCSI devices that are at the ends of the cable but TERMINATORS SHOULD BE LOCATED ONLY AT THE PHYSICAL ENDS OF THE BUS. Internal device termination is commonly supplied by a series of three SIP (single in-line pin) resistor packs located on the embedded device controller module next to the 50 pin SCSI connector. Alternately termination can be supplied by a single external terminator package installed at the end of the bus. When configuring terminators in a SCSI subsystem it is important to remember that the Initiator (host adapter module) can be located physically in the middle of the bus with two segments of the bus coming out from it. Sometimes names such as "internal SCSI bus" and "external SCSI bus" are used to describe these segments in Desktop systems. In most cases these segments will be sections of the same SCSI bus rather than two separate buses. The internal portion of the bus will be inside the host system box and external portion will be outside the box. The external portion of the bus is often exposed to device and bus reconfigurations. It is important to remember to configure terminators at each physical end of the bus and only at the ends of the bus. If termination is not properly configured intermittent errors and hard to diagnose problems can result. 4.2.5.4 Problems It is a common occurrence for the device that is supposed to be providing TERMPWR to have blown the fuse that is in line with the TERMPWR source. Unless you have a SCSI terminator with a LED to show that TERMPWR is valid, you may never know if the proper +5 volts is being supplied at the terminators. Loss of TERMPWR can result in very unpredictable results. Terminators with TERMPWR indicator LEDs can make troubleshooting a failing subsystem much quicker and easier. Marginal voltage levels on the TERMPWR line can result in a variety of intermittent and hard to isolate problems in more complex subsystem configurations. SCSI defines an alternate termination scheme that incorporates a voltage regulator on the TERMPWR line. This part, which is commonly referred to as an "active" terminator, can be substituted for passive terminators in a subsystem during troubleshooting and can be a very useful tool when dealing with the indeterminate type of problem that can be caused by marginal TERMPWR voltage levels. Digital part number 12-41296-01 is an active terminator that connects to the 50-pin connector on a SCSI device. This device feeds SCSI bus lines through the device and provides active termination at the device connector. FE-CAM01-QR is a 68-pin style external shielded terminator that provides both active termination and a indicator LED for confirming that TERMPWR is being supplied to the bus. 5.0 SCSI Protocol All transactions on the SCSI bus are made up of a series of intermediate steps called SCSI bus phases. The current bus phase is determined by status of the control signal lines. Progress between bus phases must proceed according to specific rules defined for SCSI. Some bus phases can be entered from any other bus phase while others must follow a prescribed order. A typical example is described in section 5.1.1. SCSI controller chips on the Initiator and Target devices control bus phase order and transition. These dedicated microprocessor chips also manage signal transitions and timing to assure conformance with SCSI. 5.1 Bus Phases The following different bus phases allow Initiators and Targets to gain control of the bus and to exchange commands, data, messages and other information required to coordinate bus transactions and service The bus is always in one of ten phases defined by SCSI protocol. The last six phases listed are known as the information transfer phases. BUS FREE - This phase indicates that no SCSI device is actively using the bus. The bus must be free before a SCSI device can begin an arbitration phase. ARBITRATION - This phase allows a SCSI device to gain control of the bus so it can assume the role of Initiator or Target. SELECTION - This phase allows an Initiator to select a Target for the purpose of starting a transaction. RESELECTION - The Target that won arbitration reconnects to the Initiator so they may resume a previously started transaction. COMMAND - This phase allows the Target to request command information from the Initiator. The information transferred is made of a number of bytes grouped into a data packet called a Command Descriptor Block (CDB). DATA IN - Allows the Target to request that data be transferred from the Target to the Initiator. DATA OUT - The Target requests that data be transferred from the Initiator to the Target. STATUS - Allows the Target to request that status information be transferred to the Initiator. The status byte transferred during this phase is used by the Target to let the Initiator know if a command was completed successfully or not. MESSAGE IN - The Target requests that a message be sent to the Initiator. Messages are used by Targets and Initiators for interface management. Messages can be used to abort commands, indicate errors, establish LUN number or other operation parameters or to notify an Initiator that a Target is about to disconnect from the bus. MESSAGE OUT - This allows the Target to request that messages be sent to the Target. 5.1.1 Normal Bus Phase Progression The normal progression is from the BUS FREE phase to ARBITRATION, from ARBITRATION to SELECTION or RESELECTION, and from SELECTION or RESELECTION to one or more of the information transfer phases (COMMAND, DATA, STATUS, or MESSAGE). The final information transfer phase is normally the MESSAGE IN phase where a DISCONNECT, or COMMAND COMPLETE message is transferred, followed by the BUS FREE phase. 5.2 SCSI Bus Arbitration Each SCSI device arbitrates for control of the bus during the arbitration bus phase. Arbitration priority is fixed and is based on the numerical value of each device's SCSI bus ID. The highest priority value is 7 and the lowest priority is 0. A device's SCSI bus ID is set during installation using device switches or jumpers. In some subsystems, such as Digital's StorageWorks, the device SCSI ID may be hard coded and determined by the physical location in the subsystem enclosure where the device is installed. Physical location of ID setting switches or jumpers varies widely on devices from different manufacturers. Devices use 8 data bus lines (0-7) to arbitrate for the bus. During the arbitration bus phase each device that wants to use the bus asserts the data bus line whose numerical value equals that of the device's SCSI ID. The device with the highest numerical value of bus ID wins and gets control over the bus. All other devices are required to drop the bus. Typically the Initiator's SCSI ID is set at 7 (sometimes 6). Some more complex SCSI subsystems may have dual Initiators at IDs 6 and 7. Typically tapes will be set at 5 or 4 and disks at 0, 1, 2 or 3. In general, slower Target devices are given a higher bus priority (SCSI Bus ID value). This is done to avoid configurations where fast devices that finish commands more quickly and therefore can participate in more arbitration cycles, "hog" the bus. Giving slower devices a higher priority allows them to get control of the bus more often when they do participate in arbitration. 5.3 Asynchronous vs Synchronous (Fast) Data Transfers When Initiator and Target SCSI devices transfer data they must have a method of signaling each other when they are ready or not ready to receive data. SCSI defines two methods of handshaking by which the device to receive SCSI data can notify the sending device that it is ready to receive data. These two methods are Asynchronous (default) and Synchronous (fast). During asynchronous data transfers, Targets and Initiators use the REQ and ACK control signal lines of the bus to coordinate transfer of each byte of data. The sequence must complete for each byte of data before another data byte can be transferred. Asynchronous data transfer mode is the default in SCSI subsystems. During synchronous data transfers two devices negotiate a data rate, 7 megabytes per second for example, that both devices can support. During data transfer the data is set out at the agreed to data rate. Each device knows how many bytes of data were supposed to be transferred and will toggle its handshaking control line that many times. The number of handshakes must agree with the number of bytes transferred for the transaction to proceed without an error. The design of both devices and the host SCSI device driver must be support synchronous data transfers. Much higher data transfer rates are supportable using synchronous data transfer mode. 6.0 How SCSI devices report errors When an error is detected by a SCSI device during execution of a command this situation is reported by the Target back to the host system SCSI controller (Initiator) in a Status Byte sent during the STATUS phase at the completion of each command. Status codes of "Check Condition" or "Command Terminated" indicate an error condition. When a Target reports either of these two status conditions, the Initiator, under the control of the operating system device driver will typically issue a REQUEST SENSE command to the Target to retrieve the Sense Data Bytes from the Target. Think of the Sense Data bytes as a device errorlog for the command failure. The REQUEST SENSE command is used to retrieve this errorlog. The Sense Data bytes contain detailed information about the error encountered by the device and are the key mechanism for transferring information required for fault analysis and management between the Target device and the host system. Targets also make Sense Data available to the host for other command status conditions (Condition Met/Good) but only Check Condition or Command Terminated status conditions indicate that the Target has detected an error and that Sense Data relates to an error. Sense Data returned for other command status conditions is part of normal (non-exception) Target operations. If a second error (recovered error) occurs during the execution of the REQUEST SENSE command, the Target returns the Sense Data with GOOD status and the Sense Data is valid. However, if a Target returns Check Condition status for a REQUEST SENSE command this indicates an non-recoverable error and as a result the Sense Data may NOT be valid. The above situation will be very uncommon in looking at error logs in the field. In most cases the final Message from a Target finished processing a command will be "Command Complete". It is important to note, this message sent during the command Message Phase does NOT indicate the requested operation was successful. It is simply the final step in communications between Target and Initiator and indicates that the Target is finished processing the command and communicating with the Initiator concerning the operation. The "Command Complete" message can best be thought of as the Target saying "good-bye" to the Initiator. It is not inconsistent for a command that failed with a Check Condition status to finish with a "Command Complete" message. 6.1 Map of Sense Data bytes The following map shows the fields of the Extended Sense Data format defined by the SCSI standard. The Sense Data bytes will not look like this in operating system errorlog entries. A later section of this document will show how these bytes map into a number of different operating system errorlog entries. Figure 1: EXTENDED SENSE DATA Format (For Byte 0 Bits 0:6 = 70h - Current Errors and 71h - Deferred Errors) Bit +=======+=======+=======+=======+=======+=======+=======+=======+ + 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 + ----+=======+=======+=======+=======+=======+=======+=======+=======+ Byte 0 | Valid | 1 1 1 | 0 0 0 1/0 | ----+-------+-------+-------+-------+-------+-------+-------+-------+ 1 | Segment Number | ----+-------+-------+-------+-------+-------+-------+-------+-------+ 2 |Filemrk| EOM | ILI | Rsvd. | Sense Key | ----+-------+-------+-------+-------+-------+-------+-------+-------+ 3 | (MSB) | ----+--- ---+ 4 | | ----+--- Information Bytes ---+ 5 | | ----+--- ---+ 6 | (LSB) | ----+---------------------------------------------------------------+ 7 | Additional Sense Length (n - 7) | ----+---------------------------------------------------------------+ 8 | (MSB) | ----+--- ---+ 9 | | ----+--- Command Specific Information ---+ 10 | | ----+--- ---+ 11 | (LSB) | ----+---------------------------------------------------------------+ 12 | Additional Sense Code (ASC) | ----+---------------------------------------------------------------+ 13 | Additional Sense Code Qualifier (ASCQ) | ----+---------------------------------------------------------------+ 14 | Field Replaceable Unit (FRU) Code | ----+-------+-------------------------------------------------------+ 15 | SKSV | | ----+-------+--- ---+ 16 | Sense Key Specific | ----+--- ---+ 17 | | ----+-------+-------+-------+-------+-------+-------+-------+-------+ 18 | | ----+--- Additional Sense Bytes ---+ n | | ----+-------+-------+-------+-------+-------+-------+-------+-------+ 6.2 What the Sense Data Fields Mean and How to Interpret Them This section is designed to help you interpret the fields of the SCSI Sense Data bytes. Some operating systems, for example VMS, already do some of the work for you by providing bit-to-text support for the most important fields. Some operating systems such as DOS, don't even log the Sense Data bytes. The following information will be useful in situations where the Sense Data bytes are available, but you need more information than is provided by the level of bit-to-text support. Complete interpretation of all fields can be time consuming and in most cases will not add much value to efforts to fix a subsystem. Good judgment must be used to avoid spending unnecessary time try to interpret all fields. 6.2.1 Sense Data Bytes - The Quick and Dirty "What to do". 1) Look at the Operating System error log fields to determine if the Target SCSI device has reported Check Condition SCSI Status and has returned Sense Data to the host. The fields you will need to check to determine that these two conditions are true will be some what different for each operating system. Check the section of this document that deals with the operating system you are working with; Section 7.1 for VMS, Section 7.2 for OpenVMS, Section 7.3 for Ultrix and 7.4 for K.SCSI. 2) Check to see if the SCSI Sense Data Error Code field is equal to either 70h (current error) or 71h (deferred error). If it is continue. If not, the format and contents of the Sense Data bytes are non-standard and the information is not usable unless you specifics on how a particular device uses the Sense Data bytes for the SCSI Error Code value you have. 3) Look up the Sense Key (byte 2 bits 0 - 3) in Appendix A Table 1 and the ASC/ASCQ combination (bytes 12 and 13) in Appendix A Table 2. For help in identifying the location of these bytes see Figure 1 and the sample errorlog for the operating system you are working with. See Section 6.2.3 for information on what the Sense Key and ASC/ASCQ are. Many operating system error log formatting tools will call out and decode these fields for you. 4) Check for non-zero value in the FRU field (byte 14) Information on what different values in the FRU field mean is vendor specific and may be documented in the vendors manuals. Other stuff you can do 5) Sense Key Specific bytes - If the Sense Key from step 2 is RECOVERED ERROR(1h), HARDWARE ERROR(4h) or MEDIUM ERROR(3h) Sense Keys, check the SKSV Bit (Byte 15, Bit 7). If this bit is set to one, bytes 16 and 17 will be valid and will be the Actual Retry Count Bytes. The value in this field will give some indicate of how severe the error was. The more retries the more serious the error. 6.2.2 Error Code Field (Byte 0, Bits 0 - 6) Two values for this field, (70h and 71h) are defined in SCSI. If this field is set to any other value, the meaning of this and all other fields in the Sense Data will be device specific and you will have to investigate the specific devices implementation to interpret them. This will be a very uncommon situation. The Error Code field is almost always 70h (Current Error). Current Error indicates that the Sense Data can be associated with an error or exception condition generated during execution of the command by the actual execution process. Sense Data reported with the Error Code field set to Current Error can also be the result of errors not related to any command that are first observed during execution of a command. Examples of this latter type of error include servo-mechanism off-track errors and device power-up self-test errors. Error Code 71h (Deferred Error) indicates that the Check Condition status returned is the result of an error or exception condition that occurred during execution of a previous command for which Good status has already been returned. This situation occurs as a result of some forms of caching, and with multiple command buffering. The important thing to note from a troubleshooting perspective is that Sense Data reported with an Error Code of 71h (Deferred Error) can NOT be associated with execution of any particular SCSI command. The Sense Data will be valid but don't ASSUME it was captured during, or as a result of any specific SCSI command documented elsewhere in the errorlog entry. 6.2.3 Valid Bit (Byte 0, Bit 7) This bit is used to indicate that the information contained in the Information Bytes (Bytes 3 - 6) is valid. A Valid bit of one indicates that the Information Bytes contain valid information as defined in the SCSI standard. A zero value indicates that the Information Bytes are undefined. 6.2.4 Segment Number Field (Byte 1) The information contained in the Segment Number field (byte 1) is primarily designed to support operation recovery and command retry by the host. It is of little practical use in field troubleshooting. This byte contains the number of the current segment descriptor being processed at the time the exception condition is detected on a failing COPY, COMPARE, or COPY AND VERIFY command. Segment descriptors are supplied in the parameter list associated with these three SCSI commands and communicate information such as the source and destination device addresses, device block lengths, number of blocks to be transferred and the logical block address. By supplying the host with the current segment number at the time of command failure, the Target provides the host with the information needed to restart the command from the point at which it failed. 6.2.5 Sense Key (Byte 2, Bits 0 - 3) and ASC/ASCQ (Bytes 12 and 13) The most important fields of the Extended Sense Data that are used in troubleshooting are the Sense Key (Byte 2), the Additional Sense Code (ASC) (Byte 12), the Additional Sense Qualifier (ASCQ) (Byte 13) and, if implemented, the FRU Field (Byte 14). Start by looking up these codes in Tables 1 and 2. The Sense Key, ASC and ASCQ provide a hierarchy of information. information relating to the error and exception conditions. The Sense Key provides generic categories in which error and exception conditions can be reported. Some Sense Keys indicate a hardware error and others can indicate a software error. Additional Sense Codes provide further detail describing the Sense Key. Additional Sense Code Qualifiers add further detail to the Additional Sense Code. Table 1 (Appendix A) defines the meanings of the various values of Sense Key and Table 2 defines the meanings of the various combinations of ASC/ASCQs. Its is important to note that while SCSI defines what each individual code (Sense Key or ASC/ASCQ combination) means, the definitions are general in nature. As a result the error or exception condition that cause a device to report any given code or combination of codes can be somewhat different for different devices. 6.2.6 ILI Bit (Byte 2, Bit 5) The Incorrect Length Indicator bit indicates that the requested logical block length did not match the logical block length of the data on the medium. In most cases this bit will be set in connection with an Illegal Request Sense Key (5h) and will be the result of a software error. 6.2.7 EOM Bit (Byte 2, Bit 6) For sequential-access (tapes) and printer device types, an EOM bit bit of one indicates that an end-of-medium condition (end-of-partition, beginning-of-partition, out-of-paper) exists. For tapes it indicates, in the forward direction, that the unit is at or past early warning. In the reverse direction it indicates a beginning-of-partition condition. This bit is reserved (not used) and always zero for all other device types. 6.2.8 Filemark Bit (Byte 2, Bit 7) This bit is reserved (not used) and always zero for all device types except sequential-access (tapes). For tapes, a Filemark bit of one indicates that the command read a filemark or setmark. 6.2.9 Information Bytes Field (Bytes 3 - 6) The information contained in the Information Bytes (bytes 3 - 6) is command specific is primarily designed to support operation recovery and command retry by the host. It is of little practical use in field troubleshooting unless you have details about how a specific device implements this field. The Information Bytes field will typically contain the Logical Block Address associated with the failure (Sense Key) or compare operation or the difference between the number of bytes (or blocks) the command requested be transferred and the number it actually transferred provided that the three following conditions are true. 1) The SCSI Error Code field is 70h (Current Error) 2) The Valid bit is set to one 3) The SCSI command was a COPY, COMPARE, COPY AND VERIFY, SEARCH DATA, or REASSIGN BLOCKS Some devices may define additional uses for the Information Bytes but these will be device specific and will only be defined in documentation for the specific device. For some commands, some vendors define these bytes to be the logical block address associated with the error being reported. This information CAN be useful in troubleshooting but you must have specific details on the vendor's implementation of these bytes for specific commands. 6.2.10 Additional Sense Length Field (Byte 7) The number in this field specifies how many more Sense Bytes (in hex) the Target has available. The value in this field is not adjusted to show how many bytes the host has asked for and where actually sent. The Target may have more Sense Data bytes available than the host asks for in the Request Sense command. The host will only get as many bytes as it asks for in the Request Sense command. 6.2.11 Command Specific Information Bytes (Bytes 8 - 11) The information contained in the Command Specific Information field (bytes 8 - 11) is command specific and is primarily designed to support operation recovery and command retry by the host. These bytes are of little practical use in field troubleshooting. More details are contained in Appendix B. 6.2.12 FRU Field (Byte 14) The FRU field (byte 14) may contain a code that indicates the Field Replaceable Unit (FRU) most likely to have caused the error. SCSI devices reserve this byte for a FRU code but individual devices are not required to used it. Some devices do; some devices don't. In addition the meaning of any specific FRU code value that is written in this field is defined by each device and will therefore likely be different for different devices and vendors. Devices that implement the FRU field write a non-zero value in this field to call-out a specific FRU. A zero value written in this field indicates either that the FRU field is not implemented for that device or that FRU call out information has not been identified or is not available for the error condition being reported. In any case, it is necessary to have the device specific documentation on how this field is implemented for the device before using the FRU code in troubleshooting. 6.2.13 Sense Key Specific Valid (SKSV) Bit (Byte 15, Bit 7) The Sense Key Specific Valid bit is used to indicate that the contents of the Sense Key Specific Bytes are valid. If this bit is set to one, the Sense Key Specific Bytes contain valid information. 6.2.14 Sense Key Specific Bytes (Bytes 15 - 17) The Sense-Key Specific Valid bit and Sense-Key Specific field are optional and SCSI does not require that any device use these fields. When a device does implement these fields, SCSI defines the contents of the Sense Key Specific Bytes three different ways depending on the value of the Sense Key field. These bytes are ONLY used when the Sense Key is set to ILLEGAL REQUEST, RECOVERED ERROR, HARDWARE ERROR, MEDIUM ERROR or NOT READY. These bytes are NOT valid for any other Sense Keys. 6.2.14.1 Sense-Key Specific Bytes for ILLEGAL REQUEST Sense Key (5h) If the Sense Key field is set to ILLEGAL REQUEST and the SKSV bit is set to one, the Sense-Key Specific field is defined as Field Pointer Bytes. The Field Pointer Bytes are used to identify the bit or bits of the SCSI command that resulted in the Target declaring the requested operation "illegal". More details are contained in Appendix C. However, to fully utilize the information contained in these bytes for the ILLEGAL REQUEST Sense Key requires details of SCSI commands and command data parameters that is beyond the scope of this document. In most cases an error reported with the Sense Key set to ILLEGAL REQUEST will be caused by a problem in the application or device driver or by an incompatibility between Target and Initiator microcode. ILLEGAL REQUEST Sense Keys will not typically be caused by a hardware failure. 6.2.14.2 Sense-Key Specific Bytes for RECOVERED ERROR(1h), HARDWARE ERROR(4h) and MEDIUM ERROR(3h) Sense Keys If the Sense Key is RECOVERED ERROR, HARDWARE ERROR or MEDIUM ERROR and if the SKSV bit is one, the Sense-Key Specific Bytes are defined as the Actual Retry Count Bytes. Figure 2: Actual Retry Count Bytes Bit +=======+=======+=======+=======+=======+=======+=======+=======+ + 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 + ----+=======+=======+=======+=======+=======+=======+=======+=======+ Byte 15 | SKSV | Reserved | ----+-------+-------+-------+-------+-------+-------+-------+-------+ 16 | (MSB) | ----+--- Actual Retry Count ---+ 17 | (LSB) | ======+=======+=======+=======+=======+=======+=======+=======+=======+ Bytes 16 and 17 are used to record device specific information on the actual number of retries of the recovery algorithm used in attempting to recover the error. To be most useful in troubleshooting you need to know device specific information on what actions where taken in connection with each retry and what the maximum allowable number of retries is. However, in general, this field can be useful in determining how severe a reported error was. 6.2.14.3 Sense-Key Specific Bytes for NOT READY Sense Key (FORMAT UNIT command) The Sense-Key Specific Bytes as defined for the NOT READY Sense Key are used to indicate the progress status of a format operation. More details are contained in Appendix D but these bytes as defined for the NOT READY Sense Key are of little use in troubleshooting. 6.2.15 Additional Sense Bytes Sense Data byte 18 and all that follow are defined as the Additional Sense Bytes. The data in these bytes is vendor specific and is intended to supply additional information about the nature of the Check Condition. In order to use any information contained in these bytes for troubleshooting it is necessary to have detailed information on how the specific device/vendor in question uses these bytes. This information may be contained in the vendors documentation; For example, a vendor specific SCSI implementation manual. Device drivers for most operating systems that do retrieve and log Sense Data bytes, only retrieve the first 18 bytes defined by SCSI. As a result, in the field you will often not have access to any information contained in the Additional Sense Bytes. 7.0 SCSI Sense Data Byte Locations in Operating System Error Logs. If you look at an operating system error log you will not see anything that looks like the map of the SCSI Sense Data bytes shown in Figure 1. The following sections are intended to help you locate the Sense Data bytes in some common operating system error log entries. Information on how the bytes documented in Figure 1 are mapped into various error log formats is also provided. 7.1 VAX/VMS In VAX/VMS error log entries, a VMS Error Type of 05 is used to indicate that Extended Sense Data has been received from a SCSI device. So, the first thing to do is to look for a VMS error code of 05. Next check the SCSI STATUS field of the error log entry. In cases where the SCSI STATUS is 02 (Check Condition), the Extended Sense Data has been logged because the device detected an error and reported it back to the host system. There are some uncommon situations in which, Extended Sense Data is reported back to the host but the device has not indicated Check Condition status. An example of this would Sense Data retrieved because a Target device reported a Unit Attention Condition to the host to indicate a change in Target status. The change in Target status might be due to a change in removable medium, level of microcode or condition of a synchronized spindle. Look at the VMS SCSI STATUS field of the error log entry to confirm that the Sense Data relates to a device reporting Check Condition status. There can also be situations when the device hardware is not broken but the device still reports Check Condition status. An example would when a Target reports Check Condition status with Illegal Request Sense Key in response to being sent an illegal or non-supported SCSI command or command parameter. You have to look at the actual Sense Key value to detect these situations. Immediately following the SCSI STATUS field will be the Extended Sense Data returned from the SCSI device. A sample errorlog follows: V A X / V M S SYSTEM ERROR REPORT COMPILED 9-JUN-1993 11:25:29 PAGE 27. ******************************* ENTRY 53. ******************************* ERROR SEQUENCE 422. LOGGED ON: SID 12000003 DATE/TIME 22-APR-1993 18:50:24.37 SYS_TYPE 04010002 SYSTEM UPTIME: 0 DAYS 01:06:05 SCS NODE: VAX/VMS V5.5-2 DEVICE ERROR KA46 CPU FW REV# 3. CONSOLE FW REV# 0.1 GENERIC DK SUB-SYSTEM, UNIT _DKA500:, CURRENT LABEL "LUN_0" HW REVISION 34303330 HW REVISION = 0304 ERROR TYPE 05 EXTENDED SENSE DATA RECEIVED SCSI ID 05 SCSI ID = 5. SCSI LUN 00 SCSI LUN = 0. SCSI SUBLUN 00 SCSI SUBLUN = 0. PORT STATUS 00000001 %SYSTEM-S-NORMAL, NORMAL SUCCESSFUL COMPLETION SCSI CMD 00000008 0001 READ SCSI STATUS 02 CHECK CONDITION EXTENDED SENSE DATA EXTENDED SENSE 00010070 0A000000 00000000 0002004B 0000 RECOVERED ERROR DATA PHASE ERROR In the Extended Sense data as formatted above, the four bytes on each line above are numbered from RIGHT TO LEFT. Each byte (2 hex numerals) in the above Extended Sense Data represents 8 bits. If you are not good at converting hex numerals to binary, the information in Appendix E should help. The hex numeral on the left of each byte is the most significant numeral; The hex numeral on the right of each byte is the least significant numeral. Figure 3 shows how the Sense Data bytes in Figure 1 map into the EXTENDED SENSE field as formatted in the above VMS error log entry. Figure 4 shows how the information in the SCSI Sense Data in Figure 1 maps into the EXTENDED SENSE field as formatted in the above VMS error log entry. Figure 3 - SCSI Extended Sense Data Bytes Locations and Meanings in a VMS Formatted Errorlog Entry ----+-------+-------+-------+-------+-------+-------+-------+-------+ Line 1 | Byte 3 | Byte 2 | Byte 1 | Byte 0 | | info byte | bits & sns key| Segment # |valid & errcode| ----+-------+-------+-------+-------+-------+-------+-------+-------+ Line 2 | Byte 7 | Byte 6 | Byte 5 | Byte 4 | | add. sns len. | info byte | info byte | info byte | ----+-------+-------+-------+-------+-------+-------+-------+-------+ Line 3 | Byte 11 | Byte 10 | Byte 9 | Byte 8 | | cmd spec info | cmd spec info | cmd spec info | cmd spec info | ----+-------+-------+-------+-------+-------+-------+-------+-------+ Line 4 | Byte 15 | Byte 14 | Byte 13 | Byte 12 | |SKSV & SK spec | FRU fld | ASCQ | ASC | ----+-------+-------+-------+-------+-------+-------+-------+-------+ Line 5 | Byte 19 | Byte 18 | Byte 17 | Byte 16 | | add. sns byte | add. sns byte | SK spec | SK spec | ----+-------+-------+-------+-------+-------+-------+-------+-------+ Here is how the EXTENDED SENSE field in the preceding sample error log entry breaks down. NOTE: In the example error log Sense Data bytes 18 and 19 are blank because only 18 bytes (0-17) where returned by the device. Line 1, Byte 0 = 70 Valid bit = 0, Information Bytes Not Valid Error Code = 70h (Current Error) Line 1, Byte 1 = 00 Segment Number = 00 Line 1, Byte 2 = 01h Filemark, EOM, ILI, Reserved (all zero) and Sense Key = 1h Recovered Error Line 1, Byte 3 = 00h Information Byte (MSB) Line 2, Byte 4 = 00h Information Byte Line 2, Byte 5 = 00h Information Byte Line 2, Byte 6 = 00h Information Byte (LSB)) Line 2, Byte 7 = 0Ah Additional Sense length Line 3, Byte 8 = 00h Command Specific Information Line 3, Byte 9 = 00h Command Specific Information Line 3, Byte 10 = 00h Command Specific Information Line 3, Byte 11 = 00h Command Specific Information Line 4, Byte 12 = 4Bh Additional Sense Code = Data Phase Error Line 4, Byte 13 = 00h Additional Sense Code Qualifier = no additional information Line 4, Byte 14 = 02h Field Replaceable Unit Code = 2 Line 4, Byte 15 = 00h Sense-Key Specific Line 5, Byte 16 = 00h Sense-Key Specific Line 5, Byte 17 = 00h Sense-Key Specific 7.2 VAX OpenVMS In the near future a new tool (ERT) for formatting OpenVMS and eventually VAX/VMS errorlogs will be introduced in the field. Following is an example of what a formatted error log from a SCSI device reporting check condition status will look like. Use the VMS SCSI Error Type and SCSI Status fields as documented in section 7.1 to determine if SCSI Sense Data was returned by the device as a result of a Check Condition. ******************************** ENTRY 2 ******************************** Logging OS 1. VAX OpenVMS OS version T1.0-FT4 Event sequence number 17595. Timestamp of occurrence 13-OCT-1992 17:14:28 System uptime in seconds 309. VMS error mask x00000000 Misc. VMS flags x0000 Host name ADU03 AXP HW model 0. Unknown Model System type register x00000002 DEC 4000 Unique CPU ID x00000002 mpnum x000000FF mperr x000000FF Event validity 1. Valid Event severity -1. Unknown severity code VMS entry type 1. Major Event class 3. IO Subsystem AXP Device Type 0. IO Minor Class 1. Device Error ---- Device Profile ---- Product Name RZ57 Unit Name ADU03$DKE Unit Number 200. Device Class x0001 Disk Architecture x0002 SCSI-2 ---- SCSI ERROR INFO ---- HW Revision 5000 VMS SCSI Error Type 5. Extended Sense Data from Device SCSI ID X20 SCSI LUN x00 SCSI SUBLUN x00 Port Status x00000001 Success Direct Access Command x0A WRITE Command Data x00 x00 x01 x01 x00 SCSI Status X20 Check Condition Ext Sen Lngt (Byt) 18. Error Code x70 Current Error and "Information Bytes" are Not Valid Segment # x00 Information Bytes x00000000 ^^^^^^^^ SCSI Sense Data Byte 6 5 4 3 CMD Specific Info x00000000 ^ ^ ^ ^ SCSI Sense Data Byte 11 | 9 | 10 8 Sense Key x0B Aborted Command ASC & ASCQ x4700 ASC = x0047 ASCQ = x0000 SCSI Parity Error FRU Code xE0 Sense Key Data, Byte 1 x00 Sense Key Data NOT Valid (Byte 15) Sense Key Data, Byte 2 x00 (Byte 16) 7.3 ULTRIX In ULTRIX error logs, the CAM_SCSI_STATUS field will indicate status of SCSI_STAT_CHECK_CONDITION when a device has sent Check Condition status on a command and reported Extended Sense Data to the host system. There are some uncommon situations in which Extended Sense Data is reported back to the host but the device has not indicated Check Condition status. Look at the CAM_SCSI_STATUS status field to confirm that the Sense Data relates to a device reporting Check Condition status. An example of this would Sense Data retrieved because a Target device reported a Unit Attention Condition to the host to indicate a change in Target status. The change in Target status might be due to a change in removable medium, level of microcode or condition of a synchronized spindle. Look for SCSI_STAT_CHECK_CONDITION status in the CAM_SCSI_STATUS field of the error log entry to confirm that the Sense Data relates to a device reporting Check Condition status. There can also be situations when device hardware is not broken but the device still reports Check Condition status. An example would when a Target reports Check Condition status with Illegal Request Sense Key in response to being sent an illegal or non-supported SCSI command or command parameter. You have to look at the actual Sense Key value to detect these situations. In the following ULTRIX error log, the Sense Key, ASC and ASCQ fields are clearly identified but only the Sense Key (Recovered Error) is interpreted. You will have to use Appendix A to find the meaning of the ASC/ASCQ fields. ********************************* ENTRY 56. ********************************* ----- EVENT INFORMATION ----- EVENT CLASS ERROR EVENT OS EVENT TYPE 199. CAM SCSI SEQUENCE NUMBER 19505. OPERATING SYSTEM ULTRIX 32 OCCURRED/LOGGED ON Tue Nov 19 19:52:41 1991 EST OCCURRED ON SYSTEM cam SYSTEM ID x82012001 HW REV: x1 FW REV: x20 CPU TYPE: R2000A/R3000 PROCESSOR TYPE KN01 ----- UNIT INFORMATION ----- CLASS DISK SUBSYSTEM BUS # x0000 LUN x0 TARGET x2 ----- CAM STRING ----- ROUTINE NAME cdisk_bbr_done ----- CAM STRING ----- cdisk_bbr: Not ECC Correctable Error _bad block number: 237356 ----- CAM STRING ----- DEVICE NAME DEC RZ23L ----- CAM STRING ----- ERROR TYPE Soft Error Detected (recovered) ----- CAM STRING ----- Active CCB at time of error ----- CAM STRING ----- CCB request completed with an error ----- ENT_CCB_SCSIIO ----- *MY ADDR xC1068A70 CCB LENGTH x008C FUNC CODE x01 PATH ID 0. TARGET ID 2. TARGET LUN 0. CAM FLAGS CAM_DIR_IN *PDRV_PTR xC1068818 *NEXT_CCB x00000000 *REQ_MAP xC1107E80 VOID (*CAM_CBFCNP)() x80167AD0 *DATA_PTR x10014BB0 DXFER_LEN x00002000 *SENSE_PTR xC1068830 SENSE_LEN x40 CDB_LEN x06 SGLIST_CNT x0000 CAM_SCSI_STATUS SCSI_STAT_CHECK_CONDITION SENSE_RESID x2C RESID x00000000 CAM_CDB_IO x0000000000000010219F0308 CAM_TIMEOUT x00000005 MSGB_LEN x0000 VU_FLAGS x0000 TAG_ACTION x00 ----- CAM STRING ----- Error, exception, or abnormal _condition ----- CAM STRING ----- Recovered error (success) ----- ENT_SENSE_DATA ----- ERROR CODE CODE x70 SEGMENT x00 SENSE KEY RECOVER ERR INFO BYTE 3 x00 INFO BYTE 2 x03 INFO BYTE 1 x9F INFO BYTE 0 x2C ADDITION LEN x0C CMD SPECIFIC 3 x00 CMD SPECIFIC 2 x00 CMD SPECIFIC 1 x00 CMD SPECIFIC 0 x00 ASC x17 ASQ x00 FRU xD0 SENSE SPECIFIC x000000 ADDITIONAL SENSE 0000: 00000000 00000000 00000000 00000000 *................* 0010: 00000000 00000000 00000000 00000000 *................* 0020: 00000000 00000000 00000000 00000000 *................* 0030: 00000000 00000000 00000000 00000000 *................* ******************************************************************************* In the event that you have the device specific information on the meaning of the SCSI Extended Sense Data additional Sense Bytes, it is important to know that these bytes map into the ADDITIONAL SENSE field format above as follows: ADDITIONAL SENSE 0000: 00|00|00|00 00|00|00|00 00|00|00|00 00|00|00|00 ^^|^^|^^|^^ ^^|^^|^^|^^ ^^|^^|^^|^^ ^^|^^|^^|^^ byte 21 20 19 18 25 24 23 22 29 28 27 26 33 32 31 30 The byte ordering of lines 0010, 0020 and 0030 is the same. 7.4 K.SCSI Following is the section from a formatted K.SCSI error log entry that contains SCSI Sense Data returned by an attached SCSI device after it has reported Check Condition status on a command. **************************************************************************** MODE 00 512-BYTE SECTOR FORMAT ERROR 00 CONTROLLER 00 NORMAL DRIVE OPERATION RETRY 70 112. RETRIES DEVICE DEPENDENT INFORMATION LONGWORD 1. 00002906 /.)../ LONGWORD 2. 02000000 /..../ LONGWORD 3. 00000001 /..../ LONGWORD 4. 00000000 /..../ **************************************************************************** When the RETRY field in a K.SCSI error log is 70 or F0, SCSI Sense Data bytes returned by the device will appear in the Longwords 1 and 2 of the DEVICE DEPENDENT INFORMATION as shown below. In this situation the 70 or F0 value in the RETRY field is actually Byte 0 the SCSI device Sense Data. Sense Data Byte 0 is the SCSI Error Code and Valid Bit. The value 70 or F0 in this byte will indicate Current Error with the Information Bytes either not valid (70h) or valid (F0h). FIGURE 4 - SCSI Extended Sense Data Byte Locations and Meanings in K.SCSI Formatted Errorlog Entry +-------+-------+-------+-------+-------+-------+-------+-------+ Longword 1 | Byte 3 | Byte 13 | Byte 12 | Byte 2 | | Info byte(lo) | ASCQ | ASC | bits & Sns Key| +-------+-------+-------+-------+-------+-------+-------+-------+ Longword 2 | Requestor # | Byte 6 | Byte 5 | Byte 4 | | | Info byte(hi) | Info byte | Info byte | +-------+-------+-------+-------+-------+-------+-------+-------+ Longword 3 | | | | SCSI ID or | | | | | Port # | +-------+-------+-------+-------+-------+-------+-------+-------+ Longword 4 | | | | | | | | | | +-------+-------+-------+-------+-------+-------+-------+-------+ In the example above, Unit Attention (6) Sense Key is reported with an ASC/ASCQ of 29/00; Power on, Reset, or Bus Device Reset occurred. 7.5 Looking at Unformatted Sense Data Bytes If you find yourself in a situation where an operating system reports or seems to be reporting SCSI device Sense Data but no fields or byte values are identified. Don't give up yet! It is sometimes possible to figure out if Sense Data is being reported and if it is, how the bytes are mapped in the raw data bytes. The trick is to identify the typical "footprint" of SCSI Sense Data. Try to do this using the following steps. 1) First, look for a field of two hex numerals that has a value of 70h or F0h. This MAY be byte 0 of Sense Data indicating Error Code 70h with the Valid bit set to either 0 or 1. 2) Next look at byte 2 bits 0 to 3 for a valid Sense Key value per Appendix A Table 1. Anything except Fh could be valid. 3) Look at bytes 12 and 13 to see if the values in these fields are valid ASC/ASCQ codes per Appendix A Table 2. 4) Finally, ask yourself if the meaning of the ASC/ASCQ code combination seems to make sense with the general error type description provided by the Sense Key code. For example, its reasonable to have an ID CRC or ECC Error ASC/ASCQ reported with a Recovered Error Sense Key. There is consistency in the Sense Key and ASC/ASCQ meaning since both indicate a hardware type error that might be recoverable. On the other hand you would not expect to have this ASC/ASCQ error combination reported with an Illegal Request Sense Key since Illegal Request almost always indicates a software type error. Following is an example of this type of analysis. LONGWORD 1. 0B425552 LONGWORD 2. 02000000 LONGWORD 3. 35363354 LONGWORD 4. 00000105 LONGWORD 5. 00000001 LONGWORD 6. 00002A0A LONGWORD 7. 009FF137 LONGWORD 8. 02007F00 LONGWORD 9. 0100F012 ----> (F0) Error Code = 70h, Current Error ^^ ^^ Valid bit = 1, Info Bytes valid Sense Data byte 2 0 (01) Sense Key = 1, Recovered Error LONGWORD 10. EFF13700 LONGWORD 11. A000000A LONGWORD 12. 02001000 -----------------> ASC = 10 and ASCQ = 00, ^ ^ ^ ID CRC or ECC Error byte 14 (FRU)______| | |____ byte 12 (ASC) FRU code = 2 |______ byte 13 (ASCQ) LONGWORD 13. 03000000 8.0 Errors That Happen Between SCSI Devices A second category of errors and conditions happen between SCSI devices. These errors are typically the result of failures in the physical bus or SCSI protocol by which devices communicate with each other. 8.1 Unexpected Bus Free (Unexpected Disconnect) This condition happens when a Target detects an error and goes immediately to the Bus Free phase. This indicates to the Initiator that an error has occurred. The Initiator manages the condition as an unsuccessful I/O process termination and the Target terminates the I/O process by clearing all pending data and status information for the command. It is optional for the Target to prepare Sense Data bytes for the failure. Most implementations don't prepare Sense Data or issue the Request Sense command after unexpected disconnects. The result is that you will not typically have Sense Data bytes available for the failure. Unexpected disconnects will typically be caused a bus timing problem or SCSI protocol error during a SCSI bus transaction rather than an internal device error detected while actually processing a command. The error causes the Target to abort the command. An unexpected disconnect may happen in connection with a number of the following errors. 8.2 Reset Condition The reset condition is used to immediately clear all SCSI devices from the bus. The reset condition will also cause devices to either cancel or attempt to complete any outstanding I/O processes depending on which of two reset options (hard or soft) is implemented in the device. The reset condition takes precedence over all other phases and conditions. Any SCSI device can create the reset condition by asserting the bus RST signal line. Reset is typically used to clear the bus and/or stop device operations in progress when less drastic measures do not work. Errors in bus protocol and erroneous device interactions that could cause data corruption are among the conditions that might result in a device asserting reset. Time-out conditions during device selection or reselection can result in a device creating a reset condition. In most cases the reset condition will result because of something illegal that happened on the bus or because one device detected that another was doing something seriously wrong. 8.3 Bus Device Reset Message The BUS DEVICE RESET (BDR) message is sent from an Initiator to direct a Target device to clear all I/O processes on that SCSI device. This message forces a hard reset condition to the selected SCSI device. The Target goes to the BUS FREE phase following successful receipt of this message. The conditions likely to cause this message to be sent are similar to those for the reset condition in section 8.2. The difference is that the "reset condition" (RST) requires ALL SCSI devices to clear the bus and current I/O processes. A BDR message ONLY requires the device that receives the BDR message to clear the bus and current I/O processes. 8.4 Bus Parity Errors A Target will handle parity errors detected in information transferred over the SCSI bus in one of three ways. * Go Bus Free * Retry * Report Check Condition status From a troubleshooting perspective you will most likely see an unexpected disconnect (Bus Free) or Check Condition status with the Sense Key set to Hardware Error (4h) or Aborted Command (Bh). The Additional Sense Key and Additional Sense Code Qualifier in Sense Data may provide additional information that will help define the problem. 8.5 Initiator Detected Parity Errors When an Initiator detects a parity error it will respond by sending one of two messages to the Target during a message out phase. These messages are Initiator Detected Error and Message Parity Error. The Target will respond to these messages in one of the three ways defined above. If retries are not done or are unsuccessful the result will be an unexpected disconnect (Bus Free) or Check Condition status with the Sense Key set to Hardware Error (4h) or Aborted Command (Bh). An important point here is that a problem in an Initiator or on the bus that results in bad parity in data received by a Target can cause that Target to report Check Condition status with Sense Key set to Hardware Error or Aborted Command in the Sense Data. Information provided by the Additional Sense Key and Additional Sense Code Qualifier may provide additional information that will help identify the source of the error. Any evidence that either an Initiator Detected Error or Message Parity Error message was send during the command should indicate that the source of the failure may be bus hardware or the Initiator itself. 8.6 Message Reject Message The MESSAGE REJECT message is sent from either the Initiator or Target to indicate that the last message or message byte it received was inappropriate or not supported by the device. An example of an inappropriate message would be if a Target received a TERMINATE I/O PROCESS message but was unable to stop the current I/O process. The Target would send a MESSAGE REJECT message to the Initiator. An example of a non-supported message would be if a SYNCHRONOUS DATA TRANSFER REQUEST (SDTR) message were sent to a device that did not support synchronous transfers. The MESSAGE REJECT message is almost always sent as part of bus protocol transactions. It is very unlikely that this message would be sent in connection with any type of hardware problem. Appendix A - Sense Key and Additional Sense Code Definitions The Sense Key codes used in the SCSI Sense Data Byte 2 bits 0-3 are defined in Table 1. All Additional Sense Codes and Additional Sense Code Qualifiers defined for SCSI-2 are listed in numerical order in Table 2. Table 1: Sense Key (0h-7h) Descriptions +========-====================================================================+ | Sense | Description | | Key | | |--------+--------------------------------------------------------------------| | 0h | NO SENSE. Indicates that there is no specific sense key | | | information to be reported for the designated logical unit. This | | | would be the case for a successful command or a command that | | | received CHECK CONDITION or COMMAND TERMINATED status because one | | | of the filemark, EOM, or ILI bits is set to one. | |--------+--------------------------------------------------------------------| | 1h | RECOVERED ERROR. Indicates that the last command completed | | | successfully with some recovery action performed by the target. | | | Details may be determinable by examining the additional sense | | | bytes and the information field. When multiple recovered errors | | | occur during one command, the choice of which error to report | | | (first, last, most severe, etc.) is device specific. | |--------+--------------------------------------------------------------------| | 2h | NOT READY. Indicates that the logical unit addressed cannot be | | | accessed. Operator intervention may be required to correct this | | | condition. | |--------+--------------------------------------------------------------------| | 3h | MEDIUM ERROR. Indicates that the command terminated with a non- | | | recovered error condition that was probably caused by a flaw in | | | the medium or an error in the recorded data. This sense key may | | | also be returned if the target is unable to distinguish between a | | | flaw in the medium and a specific hardware failure (sense key 4h).| |--------+--------------------------------------------------------------------| | 4h | HARDWARE ERROR. Indicates that the target detected a non- | | | recoverable hardware failure (for example, controller failure, | | | device failure, parity error, etc.) while performing the command | | | or during a self test. This Sense Key can also reported in | | | connection with an Initiator Detected Parity Error. (Section 8.5) | |--------+--------------------------------------------------------------------| | 5h | ILLEGAL REQUEST. Indicates that there was an illegal parameter in| | | the command descriptor block or in the additional parameters | | | supplied as data for some commands (FORMAT UNIT, SEARCH DATA, | | | etc.). If the target detects an invalid parameter in the command | | | descriptor block, then it terminates the command without altering | | | the medium. If the target detects an invalid parameter in the | | | additional parameters supplied as data, then the target may have | | | already altered the medium. This sense key may also indicate that| | | an invalid IDENTIFY message was received. | +=============================================================================+ Table 1: Sense Key (8h-Fh) Descriptions +========-====================================================================+ | Sense | Description | | Key | | |--------+--------------------------------------------------------------------| | 6h | UNIT ATTENTION. Indicates that the removable medium may have been| | | changed or the target has been reset. | |--------+--------------------------------------------------------------------| | 7h | DATA PROTECT. Indicates that a command that reads or writes the | | | medium was attempted on a block that is protected from this | | | operation. The read or write operation is not performed. | |--------+--------------------------------------------------------------------| | 8h | BLANK CHECK. Indicates that a write-once device or a sequential- | | | access device encountered blank medium or format-defined end-of- | | | data indication while reading or a write-once device encountered a| | | non-blank medium while writing. | |--------+--------------------------------------------------------------------| | 9h | Vendor Specific. This sense key is available for reporting vendor| | | specific conditions. | |--------+--------------------------------------------------------------------| | Ah | COPY ABORTED. Indicates a COPY, COMPARE, or COPY AND VERIFY | | | command was aborted due to an error condition on the source | | | device, the destination device, or both. | |--------+--------------------------------------------------------------------| | Bh | ABORTED COMMAND. Indicates that the target aborted the command. | | | The initiator may be able to recover by trying the command again. | | | This Sense Key can also reported in connection with an Initiator | | | Detected Parity Error. (See section 8.5) | |--------+--------------------------------------------------------------------| | Ch | EQUAL. Indicates a SEARCH DATA command has satisfied an equal | | | comparison. | |--------+--------------------------------------------------------------------| | Dh | VOLUME OVERFLOW. Indicates that a buffered peripheral device has | | | reached the end-of-partition and data may remain in the buffer | | | that has not been written to the medium. A RECOVER BUFFERED DATA | | | command(s) may be issued to read the unwritten data from the | | | buffer. | |--------+--------------------------------------------------------------------| | Eh | MISCOMPARE. Indicates that the source data did not match the data| | | read from the medium. | |--------+--------------------------------------------------------------------| | Fh | RESERVED. | +=============================================================================+ The following table is a numerical order listing of the additional sense codes and the additional sense code qualifiers for SCSI-2. Table 2: ASC and ASCQ Assignments +=============================================================================+ | D - DIRECT ACCESS DEVICE (Hard Disks, Floppies) | | .T - SEQUENTIAL ACCESS DEVICE (Tapes) | | . L - PRINTER DEVICE | | . P - PROCESSOR DEVICE | | . .W - WRITE ONCE READ MULTIPLE DEVICE (WORMs) | | . . R - READ ONLY (CD-ROM) DEVICE | | . . S - SCANNER DEVICE | | . . .O - OPTICAL MEMORY DEVICE | | . . . M - MEDIA CHANGER DEVICE (Jukebox) | | Byte . . . C - COMMUNICATION DEVICE | | 12 13 . . . . | | ASC ASCQ DTLPWRSOMC DESCRIPTION | | --- ---- ----------------------------------------------------- | | 00 00 DTLPWRSOMC NO ADDITIONAL SENSE INFORMATION | | 00 01 T FILEMARK DETECTED | | 00 02 T S END-OF-PARTITION/MEDIUM DETECTED | | 00 03 T SETMARK DETECTED | | 00 04 T S BEGINNING-OF-PARTITION/MEDIUM DETECTED | | 00 05 T S END-OF-DATA DETECTED | | 00 06 DTLPWRSOMC I/O PROCESS TERMINATED | | 00 11 R AUDIO PLAY OPERATION IN PROGRESS | | 00 12 R AUDIO PLAY OPERATION PAUSED | | 00 13 R AUDIO PLAY OPERATION SUCCESSFULLY COMPLETED | | 00 14 R AUDIO PLAY OPERATION STOPPED DUE TO ERROR | | 00 15 R NO CURRENT AUDIO STATUS TO RETURN | | 01 00 D W O NO INDEX/SECTOR SIGNAL | | 02 00 D WR OM NO SEEK COMPLETE | | 03 00 DTL W SO PERIPHERAL DEVICE WRITE FAULT | | 03 01 T NO WRITE CURRENT | | 03 02 T EXCESSIVE WRITE ERRORS | | 04 00 DTLPWRSOMC LOGICAL UNIT NOT READY, CAUSE NOT REPORTABLE | | 04 01 DTLPWRSOMC LOGICAL UNIT IS IN PROCESS OF BECOMING READY | | 04 02 DTLPWRSOMC LOGICAL UNIT NOT READY, INITIALIZING COMMAND REQUIRED | | 04 03 DTLPWRSOMC LOGICAL UNIT NOT READY, MANUAL INTERVENTION REQUIRED | | 04 04 DTL O LOGICAL UNIT NOT READY, FORMAT IN PROGRESS | | 05 00 DTL WRSOMC LOGICAL UNIT DOES NOT RESPOND TO SELECTION | | 06 00 D WR OM NO REFERENCE POSITION FOUND | | 07 00 DTL WRSOM MULTIPLE PERIPHERAL DEVICES SELECTED | | 08 00 DTL WRSOMC LOGICAL UNIT COMMUNICATION FAILURE | | 08 01 DTL WRSOMC LOGICAL UNIT COMMUNICATION TIME-OUT | | 08 02 DTL WRSOMC LOGICAL UNIT COMMUNICATION PARITY ERROR | | 09 00 DT WR O TRACK FOLLOWING ERROR | | 09 01 WR O TRACKING SERVO FAILURE | | 09 02 WR O FOCUS SERVO FAILURE | | 09 03 WR O SPINDLE SERVO FAILURE | +=============================================================================+ Table 2: (continued) +=============================================================================+ | D - DIRECT ACCESS DEVICE (Hard Disks, Floppies) | | .T - SEQUENTIAL ACCESS DEVICE (Tapes) | | . L - PRINTER DEVICE | | . P - PROCESSOR DEVICE | | . .W - WRITE ONCE READ MULTIPLE DEVICE (WORMs) | | . . R - READ ONLY (CD-ROM) DEVICE | | . . S - SCANNER DEVICE | | . . .O - OPTICAL MEMORY DEVICE | | . . . M - MEDIA CHANGER DEVICE (Jukebox) | | Byte . . . C - COMMUNICATION DEVICE | | 12 13 . . . . | | ASC ASCQ DTLPWRSOMC DESCRIPTION | | --- ---- ----------------------------------------------------- | | 0A 00 DTLPWRSOMC ERROR LOG OVERFLOW | | 0B 00 | | 0C 00 T S WRITE ERROR | | 0C 01 D W O WRITE ERROR - RECOVERED WITH AUTO REALLOCATION | | 0C 02 D W O WRITE ERROR - AUTO REALLOCATION FAILED | | 0D 00 | | 0E 00 | | 0F 00 | | 10 00 D W O ID CRC OR ECC ERROR | | 11 00 DT WRSO UNRECOVERED READ ERROR | | 11 01 DT W SO READ RETRIES EXHAUSTED | | 11 02 DT W SO ERROR TOO LONG TO CORRECT | | 11 03 DT W SO MULTIPLE READ ERRORS | | 11 04 D W O UNRECOVERED READ ERROR - AUTO REALLOCATE FAILED | | 11 05 WR O L-EC UNCORRECTABLE ERROR | | 11 06 WR O CIRC UNRECOVERED ERROR | | 11 07 W O DATA RESYCHRONIZATION ERROR | | 11 08 T INCOMPLETE BLOCK READ | | 11 09 T NO GAP FOUND | | 11 0A DT O MISCORRECTED ERROR | | 11 0B D W O UNRECOVERED READ ERROR - RECOMMEND REASSIGNMENT | | 11 0C D W O UNRECOVERED READ ERROR - RECOMMEND REWRITE THE DATA | | 12 00 D W O ADDRESS MARK NOT FOUND FOR ID FIELD | | 13 00 D W O ADDRESS MARK NOT FOUND FOR DATA FIELD | | 14 00 DTL WRSO RECORDED ENTITY NOT FOUND | | 14 01 DT WR O RECORD NOT FOUND | | 14 02 T FILEMARK OR SETMARK NOT FOUND | | 14 03 T END-OF-DATA NOT FOUND | | 14 04 T BLOCK SEQUENCE ERROR | | 15 00 DTL WRSOM RANDOM POSITIONING ERROR | | 15 01 DTL WRSOM MECHANICAL POSITIONING ERROR | | 15 02 DT WR O POSITIONING ERROR DETECTED BY READ OF MEDIUM | | 16 00 D W O DATA SYNCHRONIZATION MARK ERROR | | 17 00 DT WRSO RECOVERED DATA WITH NO ERROR CORRECTION APPLIED | | 17 01 DT WRSO RECOVERED DATA WITH RETRIES | | 17 02 DT WR O RECOVERED DATA WITH POSITIVE HEAD OFFSET | | 17 03 DT WR O RECOVERED DATA WITH NEGATIVE HEAD OFFSET | | 17 04 WR O RECOVERED DATA WITH RETRIES AND/OR CIRC APPLIED | | 17 05 D WR O RECOVERED DATA USING PREVIOUS SECTOR ID | | 17 06 D W O RECOVERED DATA WITHOUT ECC - DATA AUTO-REALLOCATED | | 17 07 D W O RECOVERED DATA WITHOUT ECC - RECOMMEND REASSIGNMENT | | 17 08 D W O RECOVERED DATA WITHOUT ECC - RECOMMEND REWRITE | +=============================================================================+ Table 2: (continued) +=============================================================================+ | D - DIRECT ACCESS DEVICE (Hard Disks, Floppies) | | .T - SEQUENTIAL ACCESS DEVICE (Tapes) | | . L - PRINTER DEVICE | | . P - PROCESSOR DEVICE | | . .W - WRITE ONCE READ MULTIPLE DEVICE (WORMs) | | . . R - READ ONLY (CD-ROM) DEVICE | | . . S - SCANNER DEVICE | | . . .O - OPTICAL MEMORY DEVICE | | . . . M - MEDIA CHANGER DEVICE (Jukebox) | | Byte . . . C - COMMUNICATION DEVICE | | 12 13 . . . . | | ASC ASCQ DTLPWRSOMC DESCRIPTION | | --- ---- ----------------------------------------------------- | | 18 00 DT WR O RECOVERED DATA WITH ERROR CORRECTION APPLIED | | 18 01 D WR O RECOVERED DATA WITH ERROR CORRECTION & RETRIES APPLIED| | 18 02 D WR O RECOVERED DATA - DATA AUTO-REALLOCATED | | 18 03 R RECOVERED DATA WITH CIRC | | 18 04 R RECOVERED DATA WITH LEC | | 18 05 D WR O RECOVERED DATA - RECOMMEND REASSIGNMENT | | 18 06 D WR O RECOVERED DATA - RECOMMEND REWRITE | | 19 00 D O DEFECT LIST ERROR | | 19 01 D O DEFECT LIST NOT AVAILABLE | | 19 02 D O DEFECT LIST ERROR IN PRIMARY LIST | | 19 03 D O DEFECT LIST ERROR IN GROWN LIST | | 1A 00 DTLPWRSOMC PARAMETER LIST LENGTH ERROR | | 1B 00 DTLPWRSOMC SYNCHRONOUS DATA TRANSFER ERROR | | 1C 00 D O DEFECT LIST NOT FOUND | | 1C 01 D O PRIMARY DEFECT LIST NOT FOUND | | 1C 02 D O GROWN DEFECT LIST NOT FOUND | | 1D 00 D W O MISCOMPARE DURING VERIFY OPERATION | | 1E 00 D W O RECOVERED ID WITH ECC | | 1F 00 | | 20 00 DTLPWRSOMC INVALID COMMAND OPERATION CODE | | 21 00 DT WR OM LOGICAL BLOCK ADDRESS OUT OF RANGE | | 21 01 M INVALID ELEMENT ADDRESS | | 22 00 D ILLEGAL FUNCTION (SHOULD USE 20 00, 24 00, OR 26 00) | | 23 00 | | 24 00 DTLPWRSOMC INVALID FIELD IN CDB | | 25 00 DTLPWRSOMC LOGICAL UNIT NOT SUPPORTED | | 26 00 DTLPWRSOMC INVALID FIELD IN PARAMETER LIST | | 26 01 DTLPWRSOMC PARAMETER NOT SUPPORTED | | 26 02 DTLPWRSOMC PARAMETER VALUE INVALID | | 26 03 DTLPWRSOMC THRESHOLD PARAMETERS NOT SUPPORTED | | 27 00 DT W O WRITE PROTECTED | | 28 00 DTLPWRSOMC NOT READY TO READY TRANSITION(MEDIUM MAY HAVE CHANGED)| | 28 01 M IMPORT OR EXPORT ELEMENT ACCESSED | | 29 00 DTLPWRSOMC POWER ON, RESET, OR BUS DEVICE RESET OCCURRED | | 2A 00 DTL WRSOMC PARAMETERS CHANGED | | 2A 01 DTL WRSOMC MODE PARAMETERS CHANGED | | 2A 02 DTL WRSOMC LOG PARAMETERS CHANGED | | 2B 00 DTLPWRSO C COPY CANNOT EXECUTE SINCE HOST CANNOT DISCONNECT | | 2C 00 DTLPWRSOMC COMMAND SEQUENCE ERROR | | 2C 01 S TOO MANY WINDOWS SPECIFIED | | 2C 02 S INVALID COMBINATION OF WINDOWS SPECIFIED | | 2D 00 T OVERWRITE ERROR ON UPDATE IN PLACE | +=============================================================================+ Table 2: (continued) +=============================================================================+ | D - DIRECT ACCESS DEVICE (Hard Disks, Floppies) | | .T - SEQUENTIAL ACCESS DEVICE (Tapes) | | . L - PRINTER DEVICE | | . P - PROCESSOR DEVICE | | . .W - WRITE ONCE READ MULTIPLE DEVICE (WORMs) | | . . R - READ ONLY (CD-ROM) DEVICE | | . . S - SCANNER DEVICE | | . . .O - OPTICAL MEMORY DEVICE | | . . . M - MEDIA CHANGER DEVICE (Jukebox) | | Byte . . . C - COMMUNICATION DEVICE | | 12 13 . . . . | | ASC ASCQ DTLPWRSOMC DESCRIPTION | | --- ---- ----------------------------------------------------- | | 2E 00 | | 2F 00 DTLPWRSOMC COMMANDS CLEARED BY ANOTHER INITIATOR | | 30 00 DT WR OM INCOMPATIBLE MEDIUM INSTALLED | | 30 01 DT WR O CANNOT READ MEDIUM - UNKNOWN FORMAT | | 30 02 DT WR O CANNOT READ MEDIUM - INCOMPATIBLE FORMAT | | 30 03 DT CLEANING CARTRIDGE INSTALLED | | 31 00 DT W O MEDIUM FORMAT CORRUPTED | | 31 01 D L O FORMAT COMMAND FAILED | | 32 00 D W O NO DEFECT SPARE LOCATION AVAILABLE | | 32 01 D W O DEFECT LIST UPDATE FAILURE | | 33 00 T TAPE LENGTH ERROR | | 34 00 | | 35 00 | | 36 00 L RIBBON, INK, OR TONER FAILURE | | 37 00 DTL WRSOMC ROUNDED PARAMETER | | 38 00 | | 39 00 DTL WRSOMC SAVING PARAMETERS NOT SUPPORTED | | 3A 00 DTL WRSOM MEDIUM NOT PRESENT | | 3B 00 TL SEQUENTIAL POSITIONING ERROR | | 3B 01 T TAPE POSITION ERROR AT BEGINNING-OF-MEDIUM | | 3B 02 T TAPE POSITION ERROR AT END-OF-MEDIUM | | 3B 03 L TAPE OR ELECTRONIC VERTICAL FORMS UNIT NOT READY | | 3B 04 L SLEW FAILURE | | 3B 05 L PAPER JAM | | 3B 06 L FAILED TO SENSE TOP-OF-FORM | | 3B 07 L FAILED TO SENSE BOTTOM-OF-FORM | | 3B 08 T REPOSITION ERROR | | 3B 09 S READ PAST END OF MEDIUM | | 3B 0A S READ PAST BEGINNING OF MEDIUM | | 3B 0B S POSITION PAST END OF MEDIUM | | 3B 0C S POSITION PAST BEGINNING OF MEDIUM | | 3B 0D M MEDIUM DESTINATION ELEMENT FULL | | 3B 0E M MEDIUM SOURCE ELEMENT EMPTY | | 3C 00 | | 3D 00 DTLPWRSOMC INVALID BITS IN IDENTIFY MESSAGE | | 3E 00 DTLPWRSOMC LOGICAL UNIT HAS NOT SELF-CONFIGURED YET | | 3F 00 DTLPWRSOMC TARGET OPERATING CONDITIONS HAVE CHANGED | | 3F 01 DTLPWRSOMC MICROCODE HAS BEEN CHANGED | | 3F 02 DTLPWRSOMC CHANGED OPERATING DEFINITION | | 3F 03 DTLPWRSOMC INQUIRY DATA HAS CHANGED | | 40 00 D RAM FAILURE (SHOULD USE 40 NN) | +=============================================================================+ Table 2: (continued) +=============================================================================+ | D - DIRECT ACCESS DEVICE (Hard Disks, Floppies) | | .T - SEQUENTIAL ACCESS DEVICE (Tapes) | | . L - PRINTER DEVICE | | . P - PROCESSOR DEVICE | | . .W - WRITE ONCE READ MULTIPLE DEVICE (WORMs) | | . . R - READ ONLY (CD-ROM) DEVICE | | . . S - SCANNER DEVICE | | . . .O - OPTICAL MEMORY DEVICE | | . . . M - MEDIA CHANGER DEVICE (Jukebox) | | Byte . . . C - COMMUNICATION DEVICE | | 12 13 . . . . | | ASC ASCQ DTLPWRSOMC DESCRIPTION | | --- ---- ----------------------------------------------------- | | 40 NN DTLPWRSOMC DIAGNOSTIC FAILURE ON COMPONENT NN (80H-FFH) | | 41 00 D DATA PATH FAILURE (SHOULD USE 40 NN) | | 42 00 D POWER-ON OR SELF-TEST FAILURE (SHOULD USE 40 NN) | | 43 00 DTLPWRSOMC MESSAGE ERROR | | 44 00 DTLPWRSOMC INTERNAL TARGET FAILURE | | 45 00 DTLPWRSOMC SELECT OR RESELECT FAILURE | | 46 00 DTLPWRSOMC UNSUCCESSFUL SOFT RESET | | 47 00 DTLPWRSOMC SCSI PARITY ERROR | | 48 00 DTLPWRSOMC INITIATOR DETECTED ERROR MESSAGE RECEIVED | | 49 00 DTLPWRSOMC INVALID MESSAGE ERROR | | 4A 00 DTLPWRSOMC COMMAND PHASE ERROR | | 4B 00 DTLPWRSOMC DATA PHASE ERROR | | 4C 00 DTLPWRSOMC LOGICAL UNIT FAILED SELF-CONFIGURATION | | 4D 00 | | 4E 00 DTLPWRSOMC OVERLAPPED COMMANDS ATTEMPTED | | 4F 00 | | 50 00 T WRITE APPEND ERROR | | 50 01 T WRITE APPEND POSITION ERROR | | 50 02 T POSITION ERROR RELATED TO TIMING | | 51 00 T O ERASE FAILURE | | 52 00 T CARTRIDGE FAULT | | 53 00 DTL WRSOM MEDIA LOAD OR EJECT FAILED | | 53 01 T UNLOAD TAPE FAILURE | | 53 02 DT WR OM MEDIUM REMOVAL PREVENTED | | 54 00 P SCSI TO HOST SYSTEM INTERFACE FAILURE | | 55 00 P SYSTEM RESOURCE FAILURE | | 56 00 | | 57 00 R UNABLE TO RECOVER TABLE-OF-CONTENTS | | 58 00 O GENERATION DOES NOT EXIST | | 59 00 O UPDATED BLOCK READ | | 5A 00 DTLPWRSOM OPERATOR REQUEST OR STATE CHANGE INPUT (UNSPECIFIED) | | 5A 01 DT WR OM OPERATOR MEDIUM REMOVAL REQUEST | | 5A 02 DT W O OPERATOR SELECTED WRITE PROTECT | | 5A 03 DT W O OPERATOR SELECTED WRITE PERMIT | | 5B 00 DTLPWRSOM LOG EXCEPTION | | 5B 01 DTLPWRSOM THRESHOLD CONDITION MET | | 5B 02 DTLPWRSOM LOG COUNTER AT MAXIMUM | | 5B 03 DTLPWRSOM LOG LIST CODES EXHAUSTED | | 5C 00 D O RPL STATUS CHANGE | | 5C 01 D O SPINDLES SYNCHRONIZED | | 5C 02 D O SPINDLES NOT SYNCHRONIZED | +=============================================================================+ Table 2: (concluded) +=============================================================================+ | D - DIRECT ACCESS DEVICE (Hard Disks, Floppies) | | .T - SEQUENTIAL ACCESS DEVICE (Tapes) | | . L - PRINTER DEVICE | | . P - PROCESSOR DEVICE | | . .W - WRITE ONCE READ MULTIPLE DEVICE (WORMs) | | . . R - READ ONLY (CD-ROM) DEVICE | | . . S - SCANNER DEVICE | | . . .O - OPTICAL MEMORY DEVICE | | . . . M - MEDIA CHANGER DEVICE (Jukebox) | | Byte . . . C - COMMUNICATION DEVICE | | 12 13 . . . . | | ASC ASCQ DTLPWRSOMC DESCRIPTION | | --- ---- ----------------------------------------------------- | | 5D 00 | | 5E 00 | | 5F 00 | | 60 00 S LAMP FAILURE | | 61 00 S VIDEO ACQUISITION ERROR | | 61 01 S UNABLE TO ACQUIRE VIDEO | | 61 02 S OUT OF FOCUS | | 62 00 S SCAN HEAD POSITIONING ERROR | | 63 00 R END OF USER AREA ENCOUNTERED ON THIS TRACK | | 64 00 R ILLEGAL MODE FOR THIS TRACK | | 65 00 | | 66 00 | | 67 00 | | 68 00 | | 69 00 | | 6A 00 | | 6B 00 | | 6C 00 | | 6D 00 | | 6E 00 | | 6F 00 | | 70 00 | | 71 00 | | 72 00 | | 73 00 | | 74 00 | | 75 00 | | 76 00 | | 77 00 | | 78 00 | | 79 00 | | 7A 00 | | 7B 00 | | 7C 00 | | 7D 00 | | 7E 00 | | 7F 00 | +=============================================================================+ Table 2: (concluded) +=============================================================================+ | D - DIRECT ACCESS DEVICE (Hard Disks, Floppies) | | .T - SEQUENTIAL ACCESS DEVICE (Tapes) | | . L - PRINTER DEVICE | | . P - PROCESSOR DEVICE | | . .W - WRITE ONCE READ MULTIPLE DEVICE (WORMs) | | . . R - READ ONLY (CD-ROM) DEVICE | | . . S - SCANNER DEVICE | | . . .O - OPTICAL MEMORY DEVICE | | . . . M - MEDIA CHANGER DEVICE (Jukebox) | | Byte . . . C - COMMUNICATION DEVICE | | 12 13 . . . . | | ASC ASCQ DTLPWRSOMC DESCRIPTION | | --- ---- ----------------------------------------------------- | | | | 80 xxh \ | | THROUGH > VENDOR SPECIFIC. | | FF xxh / | | | | xxh 80 \ | | THROUGH > VENDOR SPECIFIC QUALIFICATION OF STANDARD ASC. | | xxh FF / | | ALL CODES NOT SHOWN OR BLANK ARE RESERVED. | +=============================================================================+ Appendix B - Sense Data Command-specific Information Field Contents The command-specific information field contains information that depends on the command which was executed. SCSI defines the contents of this field for the following SCSI commands: COPY, COMPARE, COPY AND VERIFY, SEARCH DATA, and REASSIGN BLOCKS. For the COPY, COMPARE and COPY AND VERIFY commands, this field contains pointers to the Status Bytes and Sense Data from source and destination devices for the data being transferred by the command. For SEARCH DATA commands that are satisfied the Sense Key will be set to EQUAL (Ch) and the command-specific information field will contain a pointer to the location of the data being searched for. This is not an error condition. For REASSIGN BLOCKS commands that fail, this field contains the logical block address of the first defect that was not reassigned. If this information is not available or all blocks have been reassigned before the command failed, the field is set to FFFFFFFFh. If the command fails due to an unrecoverable read error of a block not specified in the command's defect list, the logical block address of the unrecovered block is returned in the Information Bytes field (bytes 3 - 6) and the Command-specific Information field is undefined. Appendix C - Sense Data Sense-Key Specific Bytes for ILLEGAL REQUEST Sense Key NOTE: To fully utilize the information contained in the Field Pointer Bytes requires details of the SCSI command and associated command data parameters for the specific command that failed. This information is available in the ANSI SCSI standard but is beyond the scope of this document. If the Sense Key field is set to ILLEGAL REQUEST and the SKSV bit is set to one, the Sense-Key Specific field is defined as shown below. Field Pointer Bytes Bit +=======+=======+=======+=======+=======+=======+=======+=======+ + 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 + ----+=======+=======+=======+=======+=======+=======+=======+=======+ Byte 15 | SKSV | C/D | Rsrvd | Rsrvd | BPV | Bit Pointer | ----+-------+-------+-------+-------+-------+-------+-------+-------+ 16 | (MSB) | ----+--- Field Pointer ---+ 17 | (LSB) | ======+=======+=======+=======+=======+=======+=======+=======+=======+ The Field Pointer field is used to indicate which illegal parameters in command descriptor blocks or data parameters are in error. A command data (C/D) bit of one indicates that the illegal parameter is in the command descriptor block. A C/D bit of zero indicates that the illegal parameter is in the data parameters sent by the Initiator during the DATA OUT phase. A bit pointer valid (BPV) bit of zero indicates that the value in the bit pointer field is not valid. A BPV bit of one indicates that the bit pointer field specifies which bit of the byte designated by the field pointer field is in error. When a multiple-bit field is in error, the bit pointer field points to the most-significant (left-most) bit of the field. The field pointer field indicates which byte of the command descriptor block or of the parameter data was in error. Bytes are numbered starting from zero, as shown in the tables describing the commands and parameters in the SCSI standard. When a multiple-byte field is in error, the pointer points to the most significant (left-most) byte of the field. Appendix D - Sense Data Sense-Key Specific Bytes for NOT READY Sense Key If a command is issued a Target that is currently executing a previously issued FORMAT UNIT command for which GOOD status has already been returned, the device will return Check Condition status with the Sense Key set to NOT READY. In this specific situation the Sense-Key Specific Bytes will be defined as the Format Progress Indication Bytes. Format Progress Indication Bytes Bit +=======+=======+=======+=======+=======+=======+=======+=======+ + 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 + ----+=======+=======+=======+=======+=======+=======+=======+=======+ Byte 15 | SKSV | Reserved | ----+-------+-------+-------+-------+-------+-------+-------+-------+ 16 | (MSB) | ----+--- Progress Indication ---+ 17 | (LSB) | ======+=======+=======+=======+=======+=======+=======+=======+=======+ The progress indication field is a percent complete indication in which the returned value is the numerator that has 65536 (10000h) as its denominator. The progress indication is based on the total format operation including any certification or initialization operations and is intended to be time related. Appendix E - Hexadecimal to Binary Conversions Hex Binary 1 0001 2 0010 3 0011 4 0100 5 0101 6 0110 7 0111 8 1000 9 1001 A 1010 B 1011 C 1100 D 1101 E 1110 F 1111 Glossary of SCSI Terms ANSI American National Standards Institute ASPI Advanced SCSI Programming Interface. A universal driver standard for SCSI introduced by Adaptec. CCS Common Command Set. Created early in the development of SCSI by an industry group to define a set of mandatory commands. Device A unit on the SCSI bus. It can be identified by its unique SCSI ID, (0-7). Examples of a device are; disk drive, tape drive or host adapter. Differential A SCSI bus employing differential drivers and receivers, EIA-485. It is limited to a cable length of 25 meters. Fast A SCSI bus using synchronous mode for data transfers. Host Adapter Device that connects to host system and handles all communication between the SCSI subsystem and the host computer. The adapter is usually an initiator on the SCSI bus. Initiator A SCSI device that initiates an operation. Typically this is the host computer's SCSI adapter. SCSI Small Computer System Interconnect SCSI-1 First incarnation of SCSI as a standard. Has been superseded by SCSI-2. Limited to 8-bit data bus and 5MB/s. SCSI-2 Second version of SCSI. Some of the improvements were that it defined a minimum number of commands a device must support and provided for synchronous communication between devices. SCSI-3 Version of standard that is presently in development. It is expected to provide auto configuration, for more than 8 devices per bus , longer cables lengths , serial bus physical layer options and other improvements still TBD. SCSI ID The device's unique SCSI address. Usually set on the device by jumpers or switches. SIP A Single In-Line Pin resistor package. Single-Ended A SCSI bus employing TTL logic levels. It is limited to a cable length of 6 meters. Target The device that performs the operation that was requested by the initiator. This is typically a peripheral device. Terminator A resistor network, i.e., SIP used to terminate both ends of the SCSI bus. TERMPWR Termination Power (+5V) supplied to the SCSI bus by any device. Wide A SCSI bus with a 16 bit data bus Although there are many SCSI-2 devices on the market, the SCSI-2 standard is still in a draft form. Once the standard is approved copies can be obtained from: Global Engineering Documents 2805 McGaw Irvine, CA 92714 (800) 854-7179 or (714) 261-1455