HBA_ScsiInquiryV2 routine

The HBA_ScsiInquiryV2 routine sends a SCSI inquiry command to the specified remote port.

Syntax

HBA_STATUS HBA_API HBA_ScsiInquiryV2(
  _In_    HBA_HANDLE HbaHandle,
  _In_    HBA_WWN    HbaPortWWN,
  _In_    HBA_WWN    discoveredPortWWN,
  _In_    HBA_UINT64 fcLUN,
  _In_    HBA_UINT8  CDB_Byte1,
  _In_    HBA_UINT8  CDB_Byte2,
  _Out_   void       *pRespBuffer,
  _Inout_ HBA_UINT32 *pRespBufferSize,
  _Out_   HBA_UINT8  *pScsiStatus,
  _Out_   void       *pSenseBuffer,
  _Inout_ HBA_UINT32 *pSenseBufferSize
);

Parameters

  • HbaHandle [in]
    Contains a value returned by the routine HBA_OpenAdapter that identifies the HBA through which the SCSI inquiry command is sent.

  • HbaPortWWN [in]
    Contains a 64-bit worldwide name (WWN) that uniquely identifies the local HBA port from which the SCSI inquiry command is sent. For a discussion of worldwide names, see the T11 committee's Fibre Channel HBA API specification.

  • discoveredPortWWN [in]
    Contains a 64-bit worldwide name (WWN) that uniquely identifies the remote HBA port to which the SCSI inquiry command is sent. For a discussion of worldwide names, see the T11 committee's Fibre Channel HBA API specification.

  • fcLUN [in]
    Indicates the fibre channel logical unit number of the logical unit to which the SCSI inquiry command is sent.

  • CDB_Byte1 [in]
    Contains the value to insert in the first byte of the command descriptor block (CDB) of the SCSI inquiry command. This member must have one of the following values:

    Value Meaning

    0

    Indicates that the SCSI inquiry command should request the standard SCSI INQUIRY data.

    1

    Indicates that the SCSI inquiry command should request the vital product data specified by CDB_Byte2.

    2

    Indicates that the SCSI inquiry command should request command support data (CmdDt) specified in CDB_Byte2.

     

  • CDB_Byte2 [in]
    Contains the value to insert in the third byte of the command descriptor block (CDB) of the SCSI inquiry command. This member must have one of the following values:

    Value in CDB_Byte1 Meaning of the value in CDB_Byte2

    1

    Indicates that CDB_Byte2 contains the page number of the vital product data to retrieve.

    2

    Indicates that CDB_Byte2 contains the operation code of the command support data to retrieve.

     

  • pRespBuffer [out]
    Pointer to a buffer that receives the output data of the SCSI inquiry command.

  • pRespBufferSize [in, out]
    Indicates the size, in bytes, of the buffer at pRespBuffer.

  • pScsiStatus [out]
    Pointer to a buffer that receives the SCSI status data.

  • pSenseBuffer [out]
    Pointer to a buffer that receives the SCSI sense data.

  • pSenseBufferSize [in, out]
    On input, indicates the size, in bytes, of the buffer at pSenseBuffer. On output, this member indicates the number of bytes of sense data returned.

Return value

The HBA_ScsiInquiryV2 routine returns a value of type HBA_STATUS that indicates the status of the HBA. In particular, HBA_ScsiInquiryV2 returns one of the following values.

Return code Description
HBA_STATUS_OK

Returned if the complete payload of a reply to the SCSI inquiry command was successfully retrieved.

HBA_STATUS_ERROR_ILLEGAL_WWN

Returned if the HBA referenced by handle does not contain a port with a name that matches HbaPortWWN.

HBA_STATUS_ERROR_NOT_A_TARGET

Returned if the specified remote port referenced by discoveredPortWWN does not have SCSI target functionality.

HBA_STATUS_ERROR_TARGET_BUSY

Returned if the SCSI inquiry command could not be delivered without causing a SCSI overlapped command condition.

HBA_STATUS_SCSI_CHECK_CONDITION

Returned if a SCSI check condition occurred and SCSI send data is provided in the buffer at pSenseBuffer.

HBA_STATUS_ERROR

Returned if an unspecified error occurred that prevented the execution of the SCSI inquiry command.

 

Requirements

Target platform

Desktop

Header

Hbaapi.h (include Hbaapi.h)

Library

Hbaapi.lib

DLL

Hbaapi.dll

See also

HBA_OpenAdapter

HBA_STATUS

 

 

Send comments about this topic to Microsoft