次の方法で共有


Initializing a NetDMA Provider Driver

Note  The NetDMA interface is not supported in Windows 8 and later.

When a NetDMA device becomes available, the Plug and Play (PnP) manager loads the NetDMA provider driver to manage the dynamic memory access (DMA) engine (if the driver is not already loaded). The PnP manager then calls the driver's DriverEntry routine (which every driver must provide) after it loads the driver.

In DriverEntry, the NetDMA provider driver sets standard driver entry points. The driver must provide the entry points for the AddDevice and Unload routines in the DRIVER_OBJECT structure. The driver must also set entry points for the IRP_MJ_Xxx requests that the driver handles. For more information about supporting I/O request packets (IRPs), see Writing Dispatch Routines.

Note  A NetDMA provider driver also sets entry points that are specific to NetDMA providers. For more information about registering NetDMA provider entry points, see Registering a NetDMA Provider.

The PnP manager passes two arguments to DriverEntry:

  • A pointer to a driver object that the I/O system created.

  • A pointer to a registry path that specifies where driver-specific parameters are stored.

The system calls the NetDMA provider driver's AddDevice routine to add a functional device object (FDO) for a DMA engine. For more information about adding a DMA engine, see Registering a NetDMA Provider.

The following IRPs are important for NetDMA provider drivers:

IRP_MN_START_DEVICE
While handling this IRP, the NetDMA provider driver initializes the DMA hardware. For more information about handling this start IRP, see Starting a NetDMA Provider.

IRP_MN_STOP_DEVICE
While handling this IRP, the NetDMA provider driver stops the DMA hardware to allow a hardware reconfiguration. For more information about handling this stop IRP, see Stopping a NetDMA Provider.

IRP_MN_REMOVE_DEVICE
While handling this IRP, the NetDMA provider driver deregisters a provider. For more information about deregistering a NetDMA provider, see Deregistering a NetDMA Provider.

IRP_MN_FILTER_RESOURCE_REQUIREMENTS
If the DMA engine supports MSI-X, the NetDMA provider driver must set the DMA engine's CPU affinities for interrupts. For more information about setting the interrupt CPU affinities for MSI-X, see Managing NetDMA Interrupts.

The PnP manager calls the NetDMA provider driver's Unload routine after all of the devices that the driver manages have been removed. For more information about unloading a NetDMA provider driver, see Unloading a NetDMA Provider Driver.