DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SVR5 and SCO OpenServer

open(D2mdi)


open -- gain access to an MDI device

Syntax

See open(D2) and open(D2str) for syntax, context, and general usage information about this entry point routine in DDI drivers.

See open(D2str) for syntax, context, and general usage information about this entry point routine in ODDI drivers.


NOTE: Beginning with DDI 8, the open( ) entry point routine has the same syntax for STREAMS-based and non-STREAMS drivers. In earlier DDI versions and for all ODDI versions, the open( ) routine has a different syntax for STREAMS drivers.

Usage

The open( ) entry point routine is called when the special device file for the MDI device is opened. This can take place at one of several points during system startup, depending on the configuration of the system:

An MDI driver must perform the following in its open( ) routine:

This must be done so that users can recover from hardware or driver problems without having to reboot the entire system. The open( ) routine should fail if the adapter did not successfully reset and initialize.

MDI drivers are single-open devices. Therefore, if a device is currently open, this open( ) should return EBUSY.

The driver's unit number(s), obtained with mdi_get_unit(D3mdi) in the driver's _load(D2mdi) routine, should be checked against the minor number (in DDI 7) or instance device number (in DDI 8). If there is no match, this open( ) should return ENODEV.

Other tasks that may be performed in an MDI driver's open( ) routine include:

Multiple adapters should be supported by the MDI driver. One special device file will be created in the /dev/mdi directory for each adapter.

Version applicability

mdi: 1, 2, 2.1 running with ddi: 7, 7mp, 8, 8mp.

References

mdi_tx_if_init(D3mdi), mdi_tx_if_enable(D3mdi), mdi_get_unit(D3mdi), open(D2), open(D2str), open(D2oddi), Node(DSP/4dsp)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005