Sunday 7 June 2015

SCSI Inquiry Command


The INQUIRY command (opcode 12h) is a SCSI primary command, used by application server (SCSI initiator) to fetch information regarding logical unit and SCSI target device. This request is processed by all SCSI device servers. Implementation of this command is mandatory for SCSI target.

Initiator can request a SCSI target for standard device information, vital product data (VPD), or information about which commands are supported by the device server. 

When SCSI initiator sends this command, it also informs the target about the type of information required. To notify this, VPD (vital product data) page codes are used. Below is the CDB (command descriptor block) structure of INQUIRY command. 




If EVPD = 0, here enable EVPD ( enable vital product data) is disabled so SCSI target sends standard device information. This information includes.. 
1. Peripheral device type
2. T10 vendor identification (8 bytes),
3. Product identification (16 bytes)
4. Product revision level (4 bytes)
5. Version descriptor identifying up to eight standards to which the device           claims conformance. (in 2 byte fields, such as 0900h for FCP-2, 0940h for         SRP, and 0960h for iSCSI). 

If EVPD = 1, then SCSI initiator requests for VPD data by specifying the VPD page code.
All SCSI targets must respond to inquiries to page 0x80. Often they have a vendor-specific response to page 0x83 too. All SCSI targets must respond to inquiries to below VPD page.
1. Supported VPD page , Page code = 00h
2. Device identification, Page code = 83h
Optionally, the INQUIRY command may support the unit serial number page (code 80h), the target operating definition page (code 82h) and other VPD pages.

If the SCSI Target does not implement the requested VPD page, then the command shall be terminated with CHECK CONDITION status with appropriate sense code.

Allocation Length specifies the length of inquiry data the initiator is prepared to accept in bytes.


Reference : SPC-4 doc

No comments:

Post a Comment