Sends a SCSI REPORT LUNS command to Logical Unit Number 0 of a remote end port.
HBA_STATUS HBA_ScsiReportLUNsV2(
HBA_HANDLE handle,
HBA_WWN hbaPortWWN,
HBA_WWN discoveredPortWWN,
void *pRspBuffer,
HBA_UINT32 *pRspBufferSize,
HBA_UINT8 *pScsiStatus,
void *pSenseBuffer,
HBA_UINT32 *pSenseBufferSize
);
The HBA_ScsiReportLunsV2 function shall send a SCSI REPORT LUNS command to Logical Unit Number 0 of a remote end port.
A SCSI command is never sent to an end port that does not have SCSI target functionality. If sending a SCSI command causes a SCSI overlapped command condition with a correctly operating target, the command will not be sent. Proper use of tagged commands is an acceptable means of avoiding a SCSI overlapped command condition with targets that support tagged commands.
Item | Description |
---|---|
handle | A handle to an open HBA through which the SCSI REPORT LUNS command is issued. |
hbaPortWWN | The Port Name for a local HBA end port through which the SCSI REPORT LUNS command is issued. |
discoveredPortWWN | The Port Name for an end port to which the SCSI REPORT LUNS command is sent. |
pRspBuffer | Pointer to a buffer to receive the SCSI REPORT LUNS command response. |
pRspBufferSize | Pointer to the size in bytes of the buffer to receive the SCSI REPORT LUNS command response. |
pScsiStatus | Pointer to a buffer to receive SCSI status. |
pSenseBuffer | Pointer to a buffer to receive SCSI sense data. |
pSenseBufferSize | Pointer to the size in bytes of the buffer to receive SCSI sense data. |
The value of the HBA_ScsiReportLunsV2 function is a valid status return value that indicates the reason for completion of the requested function. HBA_STATUS_OK is returned to indicate that the complete payload of a reply to the SCSI REPORT LUNS command has been returned. A valid status return value that most closely describes the result of the function should be returned to indicate a reason with no required value.
The return values for the following parameters are as follows:
Item | Description |
---|---|
pRspBuffer | Remains unchanged. If the function value is HBA_STATUS_OK, the buffer to which it points contains the response to the SCSI REPORT LUNS command. |
pRspBufferSize | Remains unchanged. The value of the integer to which it points is the size in bytes of the response returned by the command. This cannot exceed the size passed as an argument at this pointer. |
pScsiStatus | Remains unchanged. The value of the byte to which it points is the SCSI status. If the function value is HBA_STATUS_OK or HBA_STATUS_SCSI_CHECK_CONDITION, the value of the SCSI status can be interpreted based on the SCSI spec. A SCSI status of HBA_STATUS_OK indicates that a SCSI response is in the response buffer. A SCSI status of HBA_STATUS_SCSI_CHECK_CONDITION indicates that no value is stored in the response, and the sense buffer contains failure information if available. |
pSenseBuffer | Remains unchanged. If the function value is HBA_STATUS_SCSI_CHECK_CONDITION, the buffer to which it points contains the sense data for the command. |
pSenseBufferSize | Remains unchanged. The value of the integer to which it points is the size in bytes of the sense information returned by the command. This cannot exceed the size passed as an argument at this pointer. |
Item | Description |
---|---|
HBA_STATUS_ERROR_ILLEGAL_WWN | The HBA referenced by handle does not contain an end port with Port Name hbaPortWWN. |
HBA_STATUS_ERROR_NOT_A_TARGET | The identified remote end port does not have SCSI Target functionality. |
HBA_STATUS_ERROR_TARGET_BUSY | Unable to send the requested command without causing a SCSI overlapped command condition. |
HBA_STATUS_ERROR | Returned to indicate any problem with no required value. |