Prepares the Multiprotocol Quad Port (MPQP) device for transmitting and receiving data.
devno | Specifies the major and minor device numbers. |
devflag | Specifies the flag word. For kernel-mode processes, the devflag
parameter must be set to the DKERNEL flag, which specifies that a kernel
routine is making the mpopen call. In addition, the following flags can be
set:
Note: For user-mode processes, the DKERNEL flag must be clear. |
chan | Specifies the channel number assigned by the mpmpx entry point. |
ext | Points to the kopen_ext parameter block for kernel-mode processes. Specifies the address to the mpopen parameter block for user-mode processes. |
The mpopen entry point prepares the MPQP device for transmitting and receiving data. This entry point is invoked in response to a fp_open kernel service call. The file system in user mode also calls the mpopen entry point when an open subroutine is issued. The device should be opened for reading and writing data.
Each port on the MPQP adapter must be opened by its own mpopen call. Only one open call is allowed for each port. If more than one open call is issued, an error is returned on subsequent mpopen calls.
The MPQP device handler only supports one kernel-mode process to open each port on the MPQP adapter. It supports the multiplex (mpx) routines and structures compatible with the communications I/O subsystem, but it is not a true multiplexed device.
The kernel process must provide a kopen_ext parameter block. This parameter block is found in /usr/include/sys/comio.h file.
For a user-mode process, the ext parameter points to the mpopen structure. This is defined in the /usr/include/sys/comio.h file. For calls that do not specify a parameter block, the default values are used.
If adapter features such as the read extended status field for binary synchronous communication (BSC) message types as well as other types of information about read data are desired, the ext parameter must be supplied. This also requires the readx or read subroutine. If a system call is used, user data is returned, although status information is not returned. For this reason, it is recommended that readx subroutines be used.
Note: A CIO_START operation must be issued before the adapter is ready to transmit and receive data. Write commands are not accepted if a CIO_START operation has not been completed successfully.
The mpopen entry point can be called from the process environment only.
The common return codes for the mpopen entry point are the following:
The mpopen entry point functions with a 4-Port Multiprotocol Interface Adapter that has been correctly configured for use on a qualified network. Consult the adapter specifications for more information on configuring the adapter and network qualifications.
The mpclose entry point, mpconfig entry point, mpioctl entry point, mpmpx entry point, mpread entry point, mpselect entry point, mpwrite entry point.
The read or readx subroutine.
The fp_open kernel service.
The CIO_START mpioctl MPQP Device Handler Operation.