A miniport must register a MiniportReset function with NdisMRegisterMiniport. The definition of MiniportReset is:
NDIS_STATUS
MiniportReset(
OUT PBOOLEAN AddressingReset,
IN NDIS_HANDLE MiniportAdapterContext
);
MiniportReset will be called if NDIS determines that the miniport’s NIC has hung, either because the miniport’s MiniportCheckForHang function returned TRUE or because NDIS detected a pending send packet or request that did not complete in an agreed upon timeout period.
MiniportReset should:
·First disable further interrupts
·Null out the packets associated with any sends in progress; for instance, on a ring buffer for a busmaster DMA device, the pointers to send buffers should be cleared. The miniport relinquishes pending packet ownership, no matter the state of the send. NDIS will complete any pending sends to higher layers with an appropriate status.
·Restore the hardware state and the miniport’s internal state back to the initial state it had with respect to multicast addresses and registered filters. Either the miniport takes responsibility for doing this or it relies on NDIS.
If the miniport returns FALSE in AddressingReset, the miniport will return its addressing values to their initial state. If the miniport returns TRUE in AddressingReset, NDIS will call the miniport’s MiniportSetInformation function to set addresses and filters to their initial state. Note that it is the choice of the driver writer whether the miniport will save this addressing state so that it can restore it on a reset or whether it will rely on NDIS.