[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 2

mpclose Multiprotocol (MPQP) Device Handler Entry Point

Purpose

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.

Syntax

int mpclose (devno, chan, ext)
dev_t devno;
int chan, ext;

Parameters

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.

Description

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.

Execution Environment

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

Return Values

The common return codes for the mpclose entry point are:

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).

Implementation Specifics

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.

Related Information

The mpconfig entry point, mpioctl entry point, mpmpx entry point, mpopen entry point, mpread entry point, mpselect entry point, mpwrite entry point.

The CIO_HALT mpioctl MPQP Device Handler Operation, CIO_START mpioctl MPQP Device Handler Operation.

The close system call.

The fp_close kernel service.


[ Previous | Next | Contents | Home | Search ]