Ioctl subroutine, Select entry point – Compex Systems Advanced SerialRAID Adapters SA33-3285-02 User Manual

Page 321

Advertising
background image

ioctl Subroutine

The following ioctl operations are provided by the target-mode device driver. Some are
specific to either the target-mode device or the initiator-mode device. All require the
respective device instance be open for the operation run.

IOCINFO

Returns a structure defined in the /usr/include/sys/devinfo.h file.

TMCHGIMPARM

Allows the caller to change some parameters that are used by the target mode
device driver for a particular device instance.

TMIOSTAT

Allows the caller to get status information about the previously run write
operation.

Possible return values for the errno global variable include:

EFAULT

The kernel service failed when it tried to access the caller buffers.

EINVAL

The device not open or not configured. The operation is not applicable to
mode of this device. A parameter that is not valid was passed to the device
driver.

select Entry Point

The select entry point allows the caller to know when a specified event has occurred on
one or more target-mode devices. The event input parameter allows the caller to
specify about which of one or more conditions it wants to be notified by a bitwise OR of
one or more flags. The target-mode device driver provides support for the following
select events:

POLLIN

Check whether received data is available.

POLLSYNC

Return only events that are currently pending. No asynchronous notification
occurs.

The additional events, POLLOUT and POLLPRI, are not applicable. The target-mode
device driver does not, therefore, provide support for them.

The reventp output parameter points to the result of the conditional checks. The device
driver can return a bitwise OR of the following flags:

POLLIN

Received data is available.

The chan input parameter is used for specifying a channel number. This parameter is
not applicable for nonmultiplexed device drivers. It should be set to 0 for the
target-mode device driver.

Chapter 13. Using the Programming Interface

301

Advertising