sol_open Serial Optical Link Device Handler Entry Point

Purpose

Note: This function is supported in AIX® 5.1 and earlier only.

Initializes the Serial Optical Link (SOL) device handler and allocates the required system resources.

Kernel-Mode Syntax

#include  <sys/device.h>
#include  <sys/comio.h>
#include  <sys/soluser.h>

int sol_open ( devno,  devflag,  chan,  arg)
dev_t devno;
ulong devflag;
int chan;
struct kopen_ext *arg;

User-Mode Syntax

#include  <sys/device.h>
#include  <sys/comio.h>
#include  <sys/soluser.h>

int sol_open ( devno,  devflag,  chan,  arg)
dev_t devno;
ulong devflag;
int chan;
int arg;

Parameters

Item Description
devno Specifies the major and minor device numbers.
devflag Specifies the flag word with the following definitions:
DKERNEL
Indicates a kernel-mode process. For user-mode processes, this flag must be clear.
DNDELAY
Performs nonblocking reads and writes for this channel. Otherwise, the device handler performs blocking reads and writes for this channel.
chan Specifies the channel number assigned by the sol_mpx entry point.
arg Points to a kopen_ext structure for kernel-mode processes. The /usr/include/sys/comio.h file contains a description of this structure. For user-mode processes, this field is not used.

Description

The sol_open entry point is called when a user-mode caller issues an open, openx, or creat subroutine. The sol_open routine can also be invoked in response to an fp_opendev kernel service. This routine opens a device to read and write data.

The sol_open entry point functions with a Serial Link Adapter and Serial Optical Channel Converter that have been correctly configured for use on a qualified network. Consult hardware specifications for more information on configuring hardware and network qualifications.

Note: After the sol_open operation has successfully completed, the caller must issue a CIO_START operation before the SOL device handler can transmit or receive any data.

Execution Environment

The sol_open entry point can be called from the process environment only.

Return Values

Item Description
ENODEV Indicates the specified minor number is not valid.
EINVAL Indicates the specified parameter is not valid.
ENOMEM Indicates the device handler was not able to allocate the required memory.
EBUSY Indicates the device is already open in Diagnostic mode.