Miniport Driver Hardware Reset
A miniport driver must register a MiniportResetEx function with NdisMRegisterMiniportDriver.
MiniportResetEx can complete synchronously or asynchronously with a call to NdisMResetComplete(see the following figure).
MiniportResetEx should:
Disable further interrupts.
Clear out the data that is associated with any sends in progress. For example, on a ring buffer for a bus-master direct memory access (DMA) device, the pointers to send buffers should be cleared. Deserialized and connection-oriented miniport drivers must return NDIS_STATUS_REQUEST_ABORTED for any queued send requests.
Restore the hardware state and the miniport driver's internal state to the state that existed before the reset operation.
The miniport driver is responsible for restoring the hardware state of the device except for multicast addresses, packet filters, task offload settings, and wake up patterns. These setting are restored by either the miniport driver or NDIS. The miniport driver determines who is responsible for restoring these settings by returning a Boolean value in the AddressingReset parameter.
If the miniport driver returns FALSE in the AddressingReset parameter, the miniport driver restores its multicast addresses, packet filters, task offload settings, and wake up patterns to their initial state. If the miniport driver returns TRUE in AddressingReset, NDIS calls a connectionless miniport driver's MiniportOidRequest function or a connection-oriented miniport driver's MiniportCoOidRequest function to set the following configuration settings:
The network packet filter through a set request of OID_GEN_CURRENT_PACKET_FILTER.
The multicast address list through a set request of OID_802_3_MULTICAST_LIST.
Task offload encapsulation settings through a set request of OID_OFFLOAD_ENCAPSULATION.
Power management wake-up patterns through a set request of OID_PNP_ADD_WAKE_UP_PATTERN. Note Starting with NDIS 6.20, wake-up patterns set through OID_PM_ADD_WOL_PATTERN must be restored by the miniport driver.
Related topics
Adapter States of a Miniport Driver