次の方法で共有


Intermediate Driver Reset Operations (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.

An intermediate driver must be prepared to handle the situation where its outstanding sends on a binding to an underlying driver can be dropped because the underlying NIC is reset.

An underlying driver typically resets its NIC because NDIS calls the miniport driver's MiniportResetfunction when NDIS times out queued sends or requests bound for the NIC. A miniport driver can also reset its NIC because a higher-level driver called NdisReset. If an underlying NIC is reset, NDIS calls the ProtocolStatus(or ProtocolCoStatus) function of each bound protocol and intermediate driver with a status of NDIS_STATUS_RESET_START, and then calls the same bound driver's ProtocolStatusCompletefunction. When the miniport driver completes the reset, NDIS again calls ProtocolStatus(or ProtocolCoStatus) with a status of NDIS_STATUS_RESET_END followed by a call to ProtocolStatusComplete.

When a NIC is reset, if a bound intermediate driver has any transmit packets pending to that NIC, NDIS completes those packets back to the intermediate driver with an appropriate status. The intermediate driver must resubmit these packets again when the reset is completed.

When an intermediate driver receives a status of NDIS_STATUS_RESET_START, it should:

  • Hold any packets ready to be transmitted until ProtocolStatus or ProtocolCoStatus receives an NDIS_STATUS_RESET_END notification and ProtocolStatusComplete is called.

  • Hold any received packets that are ready to be indicated up to the next higher driver until ProtocolStatus(or ProtocolCoStatus) receives an NDIS_STATUS_RESET_END notification and ProtocolStatusComplete is called.

  • Clean up any internal state it maintains for in-progress operations and NIC status.

After until ProtocolStatus(or ProtocolCoStatus) receives NDIS_STATUS_RESET_END and ProtocolStatusCompleteis called, the intermediate driver can resume sending packets, making requests and making indications to higher-level drivers.

Because an intermediate driver usually disables timing out of sends and requests by NDIS when it calls NdisMSetAttributesEx, its MiniportResetfunction is seldom called. If MiniportResetis called, possibly because a higher-level driver called NdisReset, the intermediate driver should reset its internal state if necessary and it should always set AddressingResetto TRUE before it returns.

 

 

Send comments about this topic to Microsoft