Share via


Hardware Reset (NDIS 5.1)

Note   NDIS 5. x has been deprecated and is superseded by NDIS 6. x. For new NDIS driver development, see Network Drivers Starting with Windows Vista. For information about porting NDIS 5. x drivers to NDIS 6. x, see Porting NDIS 5.x Drivers to NDIS 6.0.

A miniport driver must register a MiniportResetfunction with NdisMRegisterMiniport. The definition of MiniportResetis:

NDIS_STATUS
 MiniportReset(
 OUT PBOOLEAN AddressingReset,
 IN NDIS_HANDLE  MiniportAdapterContext
 );

MiniportResetis called if NDIS determines that the miniport driver's network interface card (NIC) has stopped responding because of one of the following:

  • The miniport driver's MiniportCheckForHang function returned TRUE.

  • NDIS detected a pending send packet (for serialized miniport drivers only).

  • NDIS detected a pending request that did not complete in a specified time-out period.

MiniportResetcan complete synchronously or asynchronously with a call to NdisMResetComplete(see the following figure).

MiniportResetshould:

  • Disable further interrupts.

  • Clear out the packets associated with any sends in progress. For instance, on a ring buffer for a bus-master direct memory access (DMA) device, the pointers to send buffers should be cleared. A serialized miniport driver relinquishes pending packet ownership, regardless of the state of the send. For such a miniport driver, NDIS completes any pending sends to higher layers with an appropriate status. Deserialized and connection-oriented miniport drivers must return NDIS_STATUS_REQUEST_ABORTED for any queued send packets.

  • For 802.11 devices, follow the hardware reset procedures for the management of network connections and encryption keys.

  • 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 AddressingResetparameter.

If the miniport driver returns FALSE in the AddressingResetparameter, the miniport driver restores its addressing filters and other values to their initial state. If the miniport driver returns TRUE in AddressingReset, NDIS calls a connectionless miniport driver's MiniportSetInformationfunction or a connection-oriented miniport driver's MiniportCoRequestfunction to set the following configuration settings:

 

 

Send comments about this topic to Microsoft