Fibre Channel SNIA HBA API Programmer's Guide

HBA_STATUS_ERROR
Returned when a internal
library or system error is
detected.
HBA_STATUS_ERROR_BUSY
Returned when the library is
busy and cannot currently
process this call.
HBA_STATUS_ERROR_INVALID_HANDLE
Returned when the handle
passed to this function is
invalid.
HBA_STATUS_ERROR_ARG
Returned when any of the
pointers passed to this
function are NULL.
HBA_STATUS_ERROR_UNAVAILABLE
Returned when the adapter
to which the handle
corresponds is not available.
HBA_STATUS_ERROR_ILLEGAL_WWN
Returned when the WWN
given as input does not
match the WWN of any
discovered port.
HBA_STATUS_ERROR_MORE_DATA
Returned when any of the
allocated buffers is
insufficient.
HBA_STATUS_SCSI_CHECK_CONDITION
Returned when a SCSI check
condition occurs and there is
valid sense data in the
SenseBuffer.
Call order sequence: See Appendix A.
Example code:
memset (resp_buffer, 0, sizeof(resp_buffer));
memset (sense_buffer, 0, sizeof(sense_buffer));
if ((status = HBA_SendReadCapacity(adapter_handle, wwn,
fc_lun, &resp_buffer,
sizeof(resp_buffer), &sense_buffer,
sizeof(sense_buffer))) != HBA_STATUS_OK)
{
printf ("HBA_SendReadCapacity error %d\n", status);
} else
{
printf ("HBA_SendReadCapacity succeeded\n");
}
NOTE: The Partial Medium Indicator (PMI) bit is always set to zero in this function and hence
the returned Logical Block Address and Block Length in bytes are those of the last logical block
on the block device.
Control Functions
Call the following functions to control the updating of data by the common library for specific
adapters:
34 HBA Common Library APIs