+ Execute Inquiry SCSI command on a specific SCSI target.\r
+\r
+ Executes the Inquiry command on the SCSI target specified by ScsiIo.\r
+ If Timeout is zero, then this function waits indefinitely for the command to complete.\r
+ If Timeout is greater than zero, then the command is executed and will timeout after Timeout 100 ns units.\r
+ If ScsiIo is NULL, then ASSERT().\r
+ If SenseDataLength is NULL, then ASSERT().\r
+ If HostAdapterStatus is NULL, then ASSERT().\r
+ If TargetStatus is NULL, then ASSERT().\r
+ If InquiryDataLength is NULL, then ASSERT().\r
+\r
+ @param[in] ScsiIo A pointer to the SCSI I/O Protocol instance\r
+ for the specific SCSI target.\r
+ @param[in] Timeout The timeout in 100 ns units to use for the\r
+ execution of this SCSI Request Packet. A Timeout\r
+ value of zero means that this function will wait\r
+ indefinitely for the SCSI Request Packet to execute.\r
+ If Timeout is greater than zero, then this function\r
+ will return EFI_TIMEOUT if the time required to\r
+ execute the SCSI Request Packet is greater than Timeout.\r
+ @param[in, out] SenseData A pointer to sense data that was generated\r
+ by the execution of the SCSI Request Packet.\r
+ This buffer must be allocated by the caller.\r
+ If SenseDataLength is 0, then this parameter\r
+ is optional and may be NULL.\r
+ @param[in, out] SenseDataLength On input, the length in bytes of the SenseData buffer.\r
+ On output, the number of bytes written to the SenseData buffer. \r
+ @param[out] HostAdapterStatus The status of the SCSI Host Controller that\r
+ produces the SCSI bus containing the SCSI\r
+ target specified by ScsiIo when the SCSI\r
+ Request Packet was executed. See the EFI\r
+ SCSI I/O Protocol in the UEFI Specification\r
+ for details on the possible return values.\r
+ @param[out] TargetStatus The status returned by the SCSI target specified\r
+ by ScsiIo when the SCSI Request Packet was\r
+ executed on the SCSI Host Controller.\r
+ See the EFI SCSI I/O Protocol in the UEFI\r
+ Specification for details on the possible\r
+ return values. \r
+ @param[in, out] InquiryDataBuffer A pointer to inquiry data that was generated\r
+ by the execution of the SCSI Request Packet.\r
+ This buffer must be allocated by the caller.\r
+ If InquiryDataLength is 0, then this parameter\r
+ is optional and may be NULL. \r
+ @param[in, out] InquiryDataLength On input, a pointer to the length in bytes\r
+ of the InquiryDataBuffer buffer.\r
+ On output, a pointer to the number of bytes\r
+ written to the InquiryDataBuffer buffer.\r
+ @param[in] EnableVitalProductData If TRUE, then the supported vital product\r
+ data is returned in InquiryDataBuffer.\r
+ If FALSE, then the standard inquiry data is\r
+ returned in InquiryDataBuffer. \r
+\r
+ @retval EFI_SUCCESS The command executed successfully. See HostAdapterStatus,\r
+ TargetStatus, SenseDataLength, and SenseData in that order\r
+ for additional status information.\r
+ @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, but the entire\r
+ InquiryDataBuffer could not be transferred. The actual\r
+ number of bytes transferred is returned in InquiryDataLength.\r
+ @retval EFI_NOT_READY The SCSI Request Packet could not be sent because there\r
+ are too many SCSI Command Packets already queued.\r
+ The SCSI Request Packet was not sent, so no additional\r
+ status information is available. The caller may retry again later.\r
+ @retval EFI_DEVICE_ERROR A device error occurred while attempting to send SCSI\r
+ Request Packet. See HostAdapterStatus, TargetStatus,\r
+ SenseDataLength, and SenseData in that order for additional\r
+ status information.\r
+ @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet is not\r
+ supported by the SCSI initiator(i.e., SCSI Host Controller).\r
+ The SCSI Request Packet was not sent, so no additional\r
+ status information is available.\r
+ @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request\r
+ Packet to execute. See HostAdapterStatus, TargetStatus,\r
+ SenseDataLength, and SenseData in that order for\r
+ additional status information.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+ScsiInquiryCommand (\r
+ IN EFI_SCSI_IO_PROTOCOL *ScsiIo,\r
+ IN UINT64 Timeout,\r
+ IN OUT VOID *SenseData, OPTIONAL\r
+ IN OUT UINT8 *SenseDataLength,\r
+ OUT UINT8 *HostAdapterStatus,\r
+ OUT UINT8 *TargetStatus,\r
+ IN OUT VOID *InquiryDataBuffer, OPTIONAL\r
+ IN OUT UINT32 *InquiryDataLength,\r
+ IN BOOLEAN EnableVitalProductData\r
+ )\r
+{\r
+ return ScsiInquiryCommandEx (\r
+ ScsiIo,\r
+ Timeout,\r
+ SenseData,\r
+ SenseDataLength,\r
+ HostAdapterStatus,\r
+ TargetStatus,\r
+ InquiryDataBuffer,\r
+ InquiryDataLength,\r
+ EnableVitalProductData,\r
+ 0\r
+ );\r
+}\r
+\r
+/**\r
+ Execute Mode Sense(10) SCSI command on a specific SCSI target.\r
+\r
+ Executes the SCSI Mode Sense(10) command on the SCSI target specified by ScsiIo.\r
+ If Timeout is zero, then this function waits indefinitely for the command to complete.\r
+ If Timeout is greater than zero, then the command is executed and will timeout\r
+ after Timeout 100 ns units. The DBDField, PageControl, and PageCode parameters\r
+ are used to construct the CDB for this SCSI command.\r
+ If ScsiIo is NULL, then ASSERT().\r
+ If SenseDataLength is NULL, then ASSERT().\r
+ If HostAdapterStatus is NULL, then ASSERT().\r
+ If TargetStatus is NULL, then ASSERT().\r
+ If DataLength is NULL, then ASSERT().\r
+\r
+\r
+ @param[in] ScsiIo A pointer to the SCSI I/O Protocol instance\r
+ for the specific SCSI target.\r
+ @param[in] Timeout The timeout in 100 ns units to use for the\r
+ execution of this SCSI Request Packet. A Timeout\r
+ value of zero means that this function will wait\r
+ indefinitely for the SCSI Request Packet to execute.\r
+ If Timeout is greater than zero, then this function\r
+ will return EFI_TIMEOUT if the time required to\r
+ execute the SCSI Request Packet is greater than Timeout.\r
+ @param[in, out] SenseData A pointer to sense data that was generated\r
+ by the execution of the SCSI Request Packet.\r
+ This buffer must be allocated by the caller.\r
+ If SenseDataLength is 0, then this parameter\r
+ is optional and may be NULL.\r
+ @param[in, out] SenseDataLength On input, the length in bytes of the SenseData buffer.\r
+ On output, the number of bytes written to the SenseData buffer. \r
+ @param[out] HostAdapterStatus The status of the SCSI Host Controller that\r
+ produces the SCSI bus containing the SCSI target\r
+ specified by ScsiIo when the SCSI Request Packet\r
+ was executed. See the EFI SCSI I/O Protocol in the\r
+ UEFI Specification for details on the possible\r
+ return values.\r
+ @param[out] TargetStatus The status returned by the SCSI target specified\r
+ by ScsiIo when the SCSI Request Packet was executed\r
+ on the SCSI Host Controller. See the EFI SCSI\r
+ I/O Protocol in the UEFI Specification for details\r
+ on the possible return values.\r
+ @param[in, out] DataBuffer A pointer to data that was generated by the\r
+ execution of the SCSI Request Packet. This\r
+ buffer must be allocated by the caller. If\r
+ DataLength is 0, then this parameter is optional\r
+ and may be NULL. \r
+ @param[in, out] DataLength On input, a pointer to the length in bytes of\r
+ the DataBuffer buffer. On output, a pointer\r
+ to the number of bytes written to the DataBuffer\r
+ buffer. \r
+ @param[in] DBDField Specifies the DBD field of the CDB for this SCSI Command.\r
+ @param[in] PageControl Specifies the PC field of the CDB for this SCSI Command. \r
+ @param[in] PageCode Specifies the Page Control field of the CDB for this SCSI Command. \r
+\r
+ @retval EFI_SUCCESS The command executed successfully.\r
+ See HostAdapterStatus, TargetStatus, SenseDataLength,\r
+ and SenseData in that order for additional status information.\r
+ @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, but the\r
+ entire DataBuffer could not be transferred.\r