Virtual Device Requirements

A port driver must be a dynamically loadable virtual device that defines a control procedure but does not define services or APIs. The control procedure must process the SYS_DYNAMIC_DEVICE_INIT message. All other messages can be ignored.

The driver must have device name, a major and minor version number, and an initialization order. Although unique names are not required, the name that uniquely identifies the adapter supported by the driver is recommended. The initialization order for the driver must be UNDEFINED_INIT_ORDER.

The following example shows a typical virtual device declaration for a port driver


DECLARE_VIRTUAL_DEVICE PORT,\
    PORT_MAJOR_VERSION, \
    PORT_MINOR_VERSION,\
    PORT_Control,,\
    UNDEFINED_INIT_ORDER\
    ,,,Drv_Reg_Pkt

In this example, Drv_Reg_Pkt is the name of the DRP structure (also known as the device registration packet) for the driver. The DRP structure is required for loading and registration. The following example is a typical DRP definition:


Drv_Reg_Pkt DRP <EyeCatcher, DRP_MISC_PD, offset32 Port_Async_Request,\
    offset32 port_ilb, PortName, PortRev, PortFeature, Port_IF>

For successful loading, at least the DRP_LGN member of the structure must be set at when the driver is assembled. Other members must be set to zero if not initialized to valid values.

The I/O supervisor (IOS) loads and initializes all port drivers. To ensure that the IOS locates the port driver, the port driver file must have the filename extension .PDR and the file must be placed in the SYSTEM\IOSUBSYS directory.

Warning

Do not use a device entry in the SYSTEM.INI file to load a port driver.

See also DRP