Configuration information, Device-dependent subroutines, Open subroutine – Compex Systems Advanced SerialRAID Adapters SA33-3285-02 User Manual

Page 316

Advertising
background image

The calling program must observe any other rules that are needed to maintain, or
otherwise manage, the communication of data. Delays that occur when data is received
or sent through the target mode device driver are that are characteristics of the
hardware and software driver environment.

Configuration Information

When tmssan is configured (where n is the remote node number), the tmssan.im and
tmssan.tm special files are both created. An initiator-mode pair, or a target-mode pair,
must exist for each device, whether either or both modes are being used. The
target-mode node number for an attached device must be the same as the
initiator-mode node number.

Each time that you use the cfgmgr command to configure the node, the target-mode
device driver finds the remote nodes that are already connected, and automatically
configures them. Each node is expected to be identified by a unique node number.

The target-mode device driver configuration entry point must be called only for the
initiator-mode device number. The device driver configuration routine automatically
creates the configuration data for the target-mode device minor number. This data is
related to the initiator-mode data.

Device-Dependent Subroutines

The target-mode device driver provides support for the following subroutines:

v

open

v

close

v

read

v

write

v

ioctl

v

select

open Subroutine

The open subroutine allocates and initializes target, or initiator, device-dependent
structures. No commands are sent to the device as a result of running the open
subroutine.

The initiator-mode device or target-mode device must be configured but not already
opened for that mode; otherwise, the open subroutine does not work. Before the
initiator-mode device can be successfully opened, its special file must be opened for
write operations only. Before the target-mode device can be successfully opened, its
special file must be opened for read operations only.

Possible return values for the errno global variable include:

EBUSY

Attempted to run an open subroutine for a device instance that is already
open.

296

User’s Guide and Maintenance Information

Advertising