IOCTL_SCSI_GET_INQUIRY_DATA IOCTL

Returns the SCSI inquiry data for all devices on a given SCSI host bus adapter (HBA). If the IOCTL is employed in user space, the program must have opened a handle to the HBA, which can be enumerated by various means, such as SetupDixxx calls. You can use IOCTL_STORAGE_QUERY_PROPERTY to find information about a specific device on the HBA. To determine the size of the output buffer that is required, the caller should send this IOCTL request in a loop. Every time that the storage stack rejects the IOCTL with an error message that indicates that the buffer was too small, the caller should double the buffer size.

Note  The SCSI port driver and SCSI miniport driver models may be altered or unavailable in the future. Instead, we recommend using the Storport driver and Storport miniport driver models.
 

Major Code

IRP_MJ_DEVICE_CONTROL

Input Buffer

None.

Input Buffer Length

None.

Output Buffer

The buffer at Irp->AssociatedIrp.SystemBuffer contains the returned inquiry data. For a description of the layout of the inquiry data in the output buffer, see SCSI_ADAPTER_BUS_INFO.

Output Buffer Length

Parameters.DeviceIoControl.OutputBufferLength indicates the size, in bytes, of the buffer, which must be >= (sizeof(SCSI_ADAPTER_BUS_INFO) + (NumberOfBuses) * sizeof(SCSI_BUS_DATA)) + (InquiryDataSize * NumberOfLUs), where the InquiryDataSize is (sizeof(SCSI_INQUIRY_DATA) - 1 + INQUIRYDATABUFFERSIZE) rounded up to an alignment boundary.

Status Block

The Information field contains the number of bytes returned in the output buffer. The Status field indicates the results of the operation.

Requirements

   
Header ntddscsi.h (include Ntddscsi.h)

See Also

IOCTL_SCSI_MINIPORT

IOCTL_SCSI_PASS_THROUGH

IOCTL_SCSI_PASS_THROUGH_DIRECT

IOCTL_SCSI_RESCAN_BUS

IOCTL_STORAGE_QUERY_PROPERTY

SCSI_ADAPTER_BUS_INFO

SCSI_INQUIRY_DATA

STORAGE_DEVICE_DESCRIPTOR