Sends a SCSI READ CAPACITY command to a Fibre Channel port.
Common Host Bus Adapter Library (libHBAAPI.a)
#include <sys/hbaapi.h>
HBA_STATUS HBA_SendReadCapacity (handle, portWWN, fcLUN, pRspBuffer, RspBufferSize, pSenseBuffer,
SenseBufferSize)
HBA_HANDLE handle;
HBA_WWN portWWN;
HBA_UINT64 fcLUN;
void *pRspBuffer;
HBA_UINT32 RspBufferSize;
void *pSenseBuffer;
HBA_UINT32 SenseBufferSize;
The HBA_SendReadCapacity subroutine sends a SCSI READ CAPACITY command to the Fibre Channel port connected to the handle parameter and specified by the portWWN and fcLUN parameters.
Item | Description |
---|---|
handle | HBA_HANDLE to an open adapter. |
portWWN | Port world-wide name of an adapter. |
fcLUN | Fibre Channel LUN to send the SCSI READ CAPACITY command to. |
pRspBuffer | Pointer to a buffer that receives the response of the command. |
RspBufferSize | Size of the response buffer. |
pSenseBuffer | Pointer to a buffer that receives sense information. |
SenseBufferSize | Size of the sense buffer. |
If successful, HBA_STATUS_OK is returned and the pRspBuffer parameter points to the response to the READ CAPACITY command. If an error occurs, HBA_STATUS_ERROR is returned.
If the portWWN value is not a valid world-wide name connected to the specified handle, HBA_STATUS_ERROR_ILLEGAL_WWN is returned. On any other types of failures, HBA_STATUS_ERROR is returned.