Miniport Adapter States and Operations

For each adapter that it manages, an NDIS 6.0 or later miniport driver must support the following set of operational states:

Halted

The Halted state is the initial state of all adapters. When an adapter is in the Halted state, NDIS can call the driver's MiniportInitializeEx function to initialize the adapter.

Shutdown

In the Shutdown state, a system shutdown and restart must occur before the system can use the adapter again.

Initializing

In the Initializing state, a miniport driver completes any operations that are required to initialize an adapter.

Paused

In the Paused state, the adapter does not indicate received network data or accept send requests.

Restarting

In the Restarting state, a miniport driver completes any operations that are required to restart send and receive operations for an adapter.

Running

In the Running state, a miniport driver performs send and receive processing for an adapter.

Pausing

In the Pausing state, a miniport driver completes any operations that are required to stop send and receive operations for an adapter.

In the following table, the headings are the adapter states. Major events are listed in the first column. The rest of the entries in the table specify the next state that the adapter enters after an event occurs within a state. The blank entries represent invalid event/state combinations.

Event \ StateHaltedShutdownInitializingPausedRestartingRunningPausing

MiniportInitializeEx

Initializing

Initialize is complete

Paused

MiniportShutdownEx

Shutdown

Shutdown

Shutdown

Shutdown

MiniportHaltEx

Halted

MiniportRestart

Restarting

Restart is complete

Running

MiniportPause

Pausing

Pause is complete

Paused

Initialize failed

Halted

Restart failed

Paused

Send and receive operations

Running

Pausing

OID requests

Paused

Restarting

Running

Pausing

 

Note  The events listed in the preceding table are the primary events for an NDIS 6.0 or later adapter.

Note  The reset operation does not affect miniport adapter operational states. The state of the adapter might change while a reset operation is in progress. For example, NDIS might call a driver's pause handler when there is a reset operation in progress. In this case, the driver can complete either the reset or the pause operation in any order while following the normal requirements for each operation. For a reset operation, the driver can fail transmit request packets or it can keep them queued and complete them later. However, you should note that an overlying driver cannot complete a pause operation while its transmit packets are pending.

The primary miniport driver events are defined as follows:

MiniportInitializeEx

NDIS called the driver's MiniportInitializeEx function to initialize an adapter. For more information about adapter initialization, see Initializing a Miniport Adapter.

Initialize is complete

After MiniportInitializeEx returns successfully, the initialize operation is complete and the adapter is in the Paused state.

MiniportShutdownEx

NDIS called the driver's MiniportShutdownEx function to shutdown an adapter. For more information, see Miniport Adapter Shutdown.

MiniportHaltEx

NDIS called the driver's MiniportHaltEx function to halt an adapter. For more information, see Halting a Miniport Adapter.

MiniportRestart

NDIS called the driver's MiniportRestart function to restart a paused adapter. Because an adapter is in the Paused state after initialization, this event is also required to start the adapter after adapter initialization is complete. For more information, see Starting an Adapter.

Restart is complete

After the driver is ready to handle send and receive operations, the restart operation is complete and the adapter is in the Running state.

MiniportPause

NDIS called the driver's MiniportPause function to pause an adapter. For more information, see Pausing an Adapter.

Pause is complete

After the driver has completed all operations that are necessary to stop send and receive operations, the pause operation is complete and the adapter is in the Paused state.

Note  The driver must wait for NDIS to return all its outstanding receive indications before the pause operation is complete.

Initialize failed

If NDIS calls a driver's MiniportInitializeEx function and the initialization attempt fails, the adapter returns to the Halted state.

Restart failed

If NDIS calls a driver's MiniportRestart function and the restart attempt fails, the adapter remains in the Paused state.

Send and Receive Operations

A driver must handle send and receive operations in the Running and Pausing states. For more information about send and receive operations, see Miniport Driver Send and Receive Operations.

OID Requests

A driver must handle OID Requests in the Running, Restarting, Paused, and Pausing states. For more information about OID requests, see OID Requests for an Adapter.

Related topics

Halting a Miniport Adapter
Initializing a Miniport Adapter
Miniport Adapter Shutdown
Miniport Driver Send and Receive Operations
Pausing an Adapter
Starting an Adapter

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft