Note: This function is supported in AIX® 5.1 and earlier only.
Resets the Multiprotocol Quad Port (MPQP) adapter to a known state and returns system resources back to the system on the last close for that adapter.
int mpclose (devno, chan, ext)
dev_t devno;
int chan, ext;
Item | Description |
---|---|
devno | Specifies major and minor device numbers. |
chan | Specifies the channel number assigned by the mpmpx entry point. |
ext | Ignored by the MPQP device handler. |
The mpclose entry point routine resets the MPQP adapter to a known state and returns system resources to the system on the last close for that adapter. The port no longer accepts mpread, mpwrite, or mpioctl operation requests. The mpclose entry point is called in user mode by issuing a close system call. The mpclose entry point is invoked in response to an fp_close kernel service.
On an mpclose entry point, the MPQP device handler does the following:
On the last mpclose entry point for a particular adapter, the MPQP device handler also does the following:
The mpclose entry point closes the device. For each mpopen entry point issued, there must be a corresponding mpclose entry point.
Before issuing the mpclose entry point, the caller should issue a CIO_HALT operation for each CIO_START operation issued during that particular instance of open. If a close request is received without a preceding CIO_HALT operation, the functions of the halt are performed. A close request without a preceding CIO_HALT operation occurs only during abnormal termination of the port.
The mpclose 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 can be called from the process environment only.
The common return codes for the mpclose entry point are:
Return Code | Description |
---|---|
ECHRNG | Indicates the channel number is too large. |
ENXIO | Indicates the port initialization was unsuccessful. This code could also indicate that the registration of the interrupt was unsuccessful. |
ECHRNG | Indicates the channel number is out of range (too high). |