Provides access to the serial optical link by way of the Serial Optical Link Device Handler Overview.
The Serial Optical Link device driver is a component of the Communication I/O subsystem. The device driver can support from one to four serial optical ports. An optical port consists of two separate pieces. The Serial Link Adapter is on the system planar, and is packaged with two to four adapters in a single chip. The Serial Optical Channel Converter plugs into a slot on the system planar and provides two separate optical ports.
The ops0 special file provides access to the optical port subsystem. An application that opens this special file has access to all the ports, but does not need to be aware of the number of ports available. Each write operation will include a destination processor ID, and the device driver will route the data through the correct port to reach that processor. If there is more than one path to the destination, the device driver will use any link that is available, in case of a link failure.
Usage Considerations
When accessing the Serial Optical Link device driver, the following should be taken into account:
Item | Description |
---|---|
driver initialization and termination | The device driver may be loaded and unloaded. The device driver supports the configuration calls to initialize and terminate itself. |
special file support | Calls other than the open and close subroutines are discussed based on the mode in which the device driver is operating. |
Subroutine Support
The Serial Optical Link device driver provides specific support for the open, close, read, write, and ioctl subroutines.
open and close Subroutines
The device driver supports the /dev/ops0 special file as a character-multiplex special file. The special file must be opened for both reading and writing (O_RDWR). There are no particular considerations for closing the special file. The special file name is used in an open call depending on how the device is to be opened. The two types of special file names are:
Item | Description |
---|---|
/dev/ops0 | Starts the device driver in normal mode. |
/dev/ops0/S | Starts the device driver in serialized mode. As a result, the device driver transmits data in the same order in which it receives the data. |
read Subroutine
Can take the form of a read, readx, readv, or readvx subroutine. For this call, the device driver copies the data into the buffer specified by the caller.
write Subroutine
Can take the form of a write, writex, writev, or writevx subroutine. For this call, the device driver copies the user data into a kernel buffer and transmits the data.
ioctl subroutine
The Serial Optical Link device driver supports the following ioctl operations:
Item | Description |
---|---|
CIO_GET_FASTWRT | Gets attributes needed for the sol_fastwrt entry point. |
CIO_GET_STAT | Gets device status. |
CIO_HALT | Halts the device. |
CIO_QUERY | Queries device statistics. |
CIO_START | Starts the device. |
IOCINFO | I/O character information. |
SOL_CHECK_PRID | Checks if a processor ID is connected. |
SOL_GET_PRIDS | Gets connected processor IDs. |
Error Codes
The following error codes may be returned when accessing the device driver through the /dev/ops0 special file:
Item | Description |
---|---|
EACCES | Indicates access to the device is denied for one of the following
reasons:
|
EADDRINUSE | Indicates the network ID is in use. |
EAGAIN | Indicates that the transmit queue is full. |
EBUSY | Indicates one of the following:
|
EFAULT | Indicates that the specified address is not valid. |
EINTR | Indicates that a system call was interrupted. |
EINVAL | Indicates that the specified parameter is not valid. |
EIO | Indicates a general error. If an extension was provided in the call, additional data identifying the cause of the error can be found in the status field. |
EMSGSIZE | Indicates that the data was too large to fit into the receive buffer and that no arg parameter was supplied to provide an alternate means of reporting this error with a status of CIO_BUF_OVFLW. |
ENETDOWN | Indicates that the network is down. The device is unable to process the write. |
ENOCONNECT | Indicates one of the following:
|
ENODEV | Indicates that the specified minor number is not valid. |
ENOMEM | Indicates that the device driver was unable to allocate the required memory. |
ENOSPC | Indicates the network ID table is full. |
EPERM | Indicates that the device is open in a mode that does not allow a Diagnostic-mode open request. |