************************************************************************ ** ** ** SOME EDITTING NOTES: ** ** I pulled out most control commands. However I did leave ** ** in the following which you can do a translate on for ** ** your word processor. ** ** Greg Floryance ** ** ** ** ** ** ** ** **H1. or **h1. is Heading level 1 ** ** **H2. or **h2. is Heading level 2 ** ** **H3. or **h3. is Heading level 3 ** ** **H4. or **h4. is Heading level 4 ** ** **H5. or **h5. is Heading level 5 ** ** **NOTE. is IMPLEMENTERS NOTE or COMMITTEE NOTE ** ** ** ************************************************************************ **H1.INQUIRY Command Peripheral Device Type: All Operation Code Type: Mandatory / Optional Table - : Inquiry Command @&______&______&______&______&______&______&______&______# bit || 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | byte || | | | | | | | | _____++______+______+______+______+______+______+______+______! _____++______›______›______›______›______›______›______›______! 0 || Op Code = (12h) | _____++____________________&______&____________________&______! 1 || LUN | PF | Rsvd = 0 | T/L | _____++____________________›______›____________________›______! 2 || Page Code | _____++_______________________________________________________! 3 || Reserved = 0 | _____++_______________________________________________________! 4 || Allocation Length | _____++_____________&___________________________&______&______! 5 || Vendor Uniq | Reserved = 0 | Flag | Link | _____››_____________›___________________________›______›______% The INQUIRY command provides a means of reporting the Vital Product Data (VPD) of the Target and associated LUN(s). VPD is comprised of many individual pieces of information such as configuration data (Vendor ID, PRODUCT ID, MODEL, SERIAL NUMBER), manufacturing data (PLANT and DATE of manufacture), Field Replaceable Unit (FRU) data and other vendor/device specific data. Each piece of information can be treated individually as well as included in one or more groups of related information. To provide addressability, each element of VPD has associated with it a unique page code.. Both a mandatory and an optional level of implementation is defined for the INQUIRY command. The mandatory level is backward compatible with earlier versions of SCSI and allows the Initiator to determine the bus configuration at power-up time. The optional level allows the Initiator to request detailed VPD information about the Target or associated LUN(s) required to service a device. **note. The content of the detailed VPD is vendor unique and can not be interpreted by a host operating system without having intimate knowledge of the device. However, defined within this standard is a reporting format which permits the creation of device independent host system software to display VPD information associated with a defective FRU such as would be indicated in byte 14 of the Request Sense data. The Page Format (PF) bit of zero indicates that Inquiry data format is as specified in ANSI X3.131-1986. A PF bit of one indicates that the Inquiry data format is as specified in this document. The Target or LUN (T/L) bit of 1 indicates that the requested VPD should come from the Target specified at selection time while a value of 0 indicates that the requested VPD should come form the LUN specified in the Identify message. The Page Code (PC) field specifies which page to return. It is only valid when the PF bit is one. The page codes are defined in the following figure. Page Code Description __________ _________________________________________________________ 00h List of VPD Identifiers 01h ROM Software code EC level 02h RAM Software code EC level 03h Hardware EC level 04h Unit Serial Number 05h Manufacturing Data (Manufacturer, Plant, Date, etc.) 06h - 5Fh Reserved 60h - 7Fh Vendor Unique 80h - FFh FRU code as returned in Request Sense data byte 14 The ALLOCATION LENGTH field indicates the MAXIMUM number of bytes that the Initiator has allocated for the returned INQUIRY data. An Allocation length of zero indicates that no INQUIRY data shall be transferred and is not considered an error. The Target shall terminate the DATA IN phase when either all available INQUIRY data bytes have been transferred to the Initiator or the allocation length has been transferred. **h3.PROTOCOL RULES **h4.Effect of Unit Attention The Inquiry command is special to SCSI since it will always execute even when a Unit Attention condition exists. If an INQUIRY command is received from an initiator with a pending unit attention condition (before the target reports CHECK CONDITION status), then the target shall perform the INQUIRY command and shall not clear the unit attention condition. However, if an INQUIRY command (or any command except Request Sense) is recevied after a prior command returned CHECK CONDITION status, the sense data will be lost and the Unit Attention will be cleared. The ability for the Inquiry command to execute at all times is vital when a device error occurs which prohibits normal command execution. In such a degraded case, a CHECK CONDITION would be returned and the follow-up sense data would contain the failing FRU ID. Execution of the optional mode of the Inquiry command will then allow the initiator to obtain detailed VPD information for the device and the FRU in error. **h4.UNSUPPORTED PAGE CODE WHEN PF=0 When PF=0, the page code field is not defined to this standard and is considered reserved. Therefore, a CHECK CONDITION shall be returned. **h4.CHECK CONDITION FOR UNSUPPORTED OPTIONS Support for PF=1 is optional. If it is not supported by a Target, then CHECK CONDITION should be returned. When PF=1 and the Initiator specifies a page code which is not supported by the Target, then a CHECK CONDITION shall be returned. **note. The Initiator can determine the supported page codes of the Target and LUN by requesting the summary VPD format (PF=1, Page Code = 0). If the device does not support target Inquiry data then CHECK CONDITION should be returned. **h4.INDICATION OF AN UNSUPORTED LUN If the device does not support the specified LUN, then the device shall respond by returning peripheral device type 7F. **h3.MISCELLANEOUS NOTES **note. In order to expedite system configuration at power-up time, prompt response to the Inquiry command is often required. This suggests that the summary data should be available without requiring a media access. **note. The availability of detailed FRU data should coincide with the tests which may detect and call out an error. **note. There is no attempt to define the location or method of storing INQUIRY data for the Target and LUN(s). Target VPD data could be stored in the Target or on 1 or more LUNs. Likewise, the LUN VPD could be stored in the Target, on the same LUN or on a different LUN under the Target. The method of saving the VPD data could include hard-wired, switches, EEPROM, media, etc. The availability of the data may also be a function of the storage location and method as accessibility to the data may require a motor spin-up or completion of diagnostics. Time critical requirements are an implementation consideration and not addressed in **note. .Another device type 'Target' should be defined. It is needed when the summary page code list is requested from the Target. **note. The mechanism for storing and/or processing of the VPD data is vendor unique and assumes a detailed knowledge of the Target/LUNs design. **note. It is possible to combine multiple FRUs under a single page code. It is also possible for a single FRU to appear in more than one page code. Such implementations are vendor unique and are not described in this standard. **note. SCSI-2 rev 1 defined bits 0-3 of the page code field as a DESIRED DATA FORMAT field. This only applied when PF=0. The proposed use of this field was to define the SCSI version level for communication between the initiator and target. This technique has been couched in considerable controversy and was not included in the originally proposal approved by the committee. Therefore, the concept has not been included here but could be easily added with the only effect of changing the previous paragraph. **note. The Request Sense command needs to distinguish Target identification for the FRU and error fields. Example is how to distinguish if both Target and LUN have loadable ucode and one fails. Another example is the confusion arising when a target from manufacturer 1 has the same FRU or error codes as an attached LUN from manufacturer 2. **h3.Summary VPD Format (PF=0, Page Code=n) Table 7-8: Summary VPD Format @&______&______&______&______&______&______&______&______# bit || 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | byte || | | | | | | | | _____++______+______+______+______+______+______+______+______! _____++______›______›______›______›______›______›______›______! 0 || Peripheral Device Type | _____++______&________________________________________________! 1 || RMB | Device Type Qualifier | _____++______›______&____________________&____________________! 0 || ISO Version | ECMA Version | ANSI-Approved Versn| _____++_____________›_____________&______›____________________! 3 || Reserved = 0 | Response Data Format | _____++___________________________›___________________________! 4 || Additional Length (n-4) | _____++_______________________________________________________! 5 || | 7 || Reserved | _____++_______________________________________________________! 8 || Vendor ID | 15 || | _____++_______________________________________________________! 16 || Product ID | 31 || | _____++_______________________________________________________! 32 || Product Revision Level | 35 || | _____++_______________________________________________________! 36 || Vendor Unique | 55 || | _____++_______________________________________________________! 56 || Reserved | 95 || | _____++_______________________________________________________! 96 || Vendor Unique | 255 || | _____››_______________________________________________________% The Summary VPD Format is the only mandatory command mode. It is typically used at power-up time to configure the bus. The RDF field identifies the level of SCSI to which the following data is formatted. The RDF field also indicates the version of level to be used for all further communications with the Initiator. The INQUIRY data contains 36 required bytes, followed by a variable number of vendor unique parameters. Bytes 0 thru 7 are value fields while byte 8 thru 36 are ASCII character fields. The definition for these fields is not repeated here but can be found in the version 2 SCSI standard. **note. In order to assist in the writing of generic host software, bytes 36 thru 55 should be ASCII fields capable of being directly displayed on the operator console. **note. Each ASCII field is left justified with an ASCII blank used to indicate End Of Field. Also, the ASCI characters should be limited to those graphics codes in the range of 20h thru 7Fh. **note. Recent debate has surfaced over which Product ID, Vendor ID and Revision Level is returned in the summary Inquiry data when a device may consist of a subsystem manufactured by company x (Target) with components (LUNs) manufactured by companies y and z. The information being returned should be associated with that portion of the subsystem which handles communications on the SCSI bus. All other subsystem components can be considered FRUs and reported in the vendor unique area of the summary command or in the optional detailed VPD implementations defined to this standard. Also note that the use of the T/L bit for the optional modes does away with the ambiguity of which component of the system is reporting the data. **note. For this mode, data should be made available without delay resulting from media spin-up or for the completion of all internal device diagnostics. Once the ability to be selected is established, the execution of this command should not be delayed for mechanical or diagnostic reasons. **h4.Summary List of VPD Identifiers (PF=1, PC=0) @&______&______&______&______&______&______&______&______# bit || 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | byte || | | | | | | | | _____++______+______+______+______+______+______+______+______! _____++______›______›______›______›______›______›______›______! 0 || Peripheral Device Type | _____++_______________________________________________________! 1 || Return Control Info | _____++_______________________________________________________! 2 || Return Page Code | _____++_______________________________________________________! 3 || Reserved | _____++_______________________________________________________! 4 || List Length | _____++_______________________________________________________! 5-7 || Reserved | _____++_______________________________________________________! 8 || FIRST PAGE CODE | _____++_______________________________________________________! . . . . . . . . . _____++_______________________________________________________! n+7 || Nth PAGE CODE | _____››_______________________________________________________% This mode requests that a summary list of page codes for either the Target (T/L=1) or for a LUN (T/L=0) be sent to the Initiator. **h5.The Peripheral Device Type field is returned for the particular Target or LUN. **h5.The Return Control Info field returns the value of byte 1 of the CDB which contains the PF and T/L bits. **h5.The Return Page Code field returns the value of byte 2 of the CDB. **H5.The List Length field indicates the length of the list which is being returned to the Initiator. This value does not include bytes 0 thru 3. A length of 0 indicates that their are no page codes to report and is not considered an error. **h5.The Nth PAGE CODE field has an entry for each page code in the list. The number assigned to page codes for a particular piece of VPD information is vendor unique. **note Limitations in the size of the data transfer phase limits the maximum number of page codes in the list to 252. **note. It is not intended that the Initiator process byte 1 bits 5-7 as a LUN number. Version 2 SCSI devices do not use this field but rather make exclusive use of the Identify message for determining the LUN number. **h4.Read Detailed VPD Information (PF=1, PC=n) @&______&______&______&______&______&______&______&______# bit || 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | byte || | | | | | | | | _____++______+______+______+______+______+______+______+______! _____++______›______›______›______›______›______›______›______! 0 || Peripheral Device Type | _____++_______________________________________________________! 1 || Return Control Info | _____++_______________________________________________________! 2 || Return Page Code | _____++_______________________________________________________! 3-7 || Reserved | _____++_______________________________________________________! 8 || ASCII Data Length (n) | _____++_______________________________________________________! . || | . || ASCII VPD DATA | _____++_______________________________________________________! 8+n || Additional Information Length | _____++_______________________________________________________! 9+n || | . || Vendor Unique Data | . || | _____››_______________________________________________________% This mode requests that detailed VPD for the page code of either the Target (T/L=1) or the LUN (T/L=0) be sent to the Initiator. The format of the data returned to the Initiator is as follows: **h5.The Peripheral Device type field is returned for the particular Target or LUN. **h5.The Return Control Info field returns the value of byte 1 of the CDB which contains the PF and T/L bits. **h5.The Return Page Code field returns the value of byte 2 of the CDB. **H5.The ASCII DATA LENGTH field indicates the amount of ASCII VPD available for the specified page code. This value only includes bytes 9 through the Additional Information Length byte. A length field value of 0 indicates that their is no ASCII data to return and is not considered an error. **h5.The ASCII VPD DATA field contains ASCII VPD for the specified page code. This field will allow the direct display of VPD on the system console by the Initiator. This field allows for device independent Initiator code to be written to display pertinent VPD for a Target or LUN without requiring any interpretation of the data on the part of the Initiator. **h5.The ADDITIONAL INFORMATION LENGTH field specifies the amount of vendor unique data which follows the ASCII data. **h5.The VENDOR UNIQUE DATA field is vendor unique and can contain other formats of the same ASCII data such as EBCDIC, BCD or value fields.