Freigeben über


MiniportISR (Windows CE 5.0)

Send Feedback

This function is a required function if the driver's network adapter generates interrupts.

VOIDMiniportISR(PBOOLEANInterruptRecognized,PBOOLEANQueueMiniportHandleInterrupt,NDIS_HANDLEMiniportAdapterContext);

Parameters

  • InterruptRecognized
    [out] Points to a variable in which MiniportISR returns whether the network adapter actually generated the interrupt. MiniportISR sets this to TRUE if it detects that the interrupt came from the network adapter designated at MiniportAdapterContext.

    If its network adapter shares an IRQ with other devices on the same bus, MiniportISR should return FALSE as quickly as possible whenever it determines that the network adapter did not interrupt.

  • QueueMiniportHandleInterrupt
    [out] Points to a variable that MiniportISR sets to TRUE if the MiniportHandleInterrupt function should be called to complete the interrupt-driven I/O operation.

    If the variable at InterruptRecognized is set to FALSE, the value of this variable is irrelevant because MiniportHandleInterrupt will not be called.

  • MiniportAdapterContext
    [in] Specifies the handle to a miniport-allocated context area in which the driver maintains per-network adapter state, set up by MiniportInitialize.

Return Values

None.

Remarks

Any network adapter driver should do as little work as possible in its MiniportISR function, deferring I/O operations for each interrupt the network adapter generates to the MiniportHandleInterrupt function. A network adapter driver's ISR is not re-entrant on Windows CE-Based devices, although two instantiations of a MiniportISR function can execute concurrently in SMP machines, particularly if the miniport supports full duplex sends and receives. Note that SMP is not supported for Windows CE.

MiniportISR is called under the following conditions:

  • An interrupt occurs on the network adapter while the driver's MiniportInitialize or MiniportHalt function is running.
  • An interrupt occurs on the I/O bus and the network adapter shares an IRQ with other devices on that bus.
  • If the network adapter shares an IRQ with other devices, that miniport's ISR must be called on every interrupt to determine whether its network adapter actually generated the interrupt. If not, MiniportISR should return FALSE immediately so the driver of the device that actually generated the interrupt is called quickly. This strategy maximizes I/O throughput for every device on the same bus.
  • An interrupt occurs and the network adapter driver specified that its ISR should be called to handle every interrupt when its MiniportInitialize function called NdisMRegisterInterrupt.
  • Miniports that do not provide MiniportDisable/EnableInterrupt functionality must have their ISRs called on every interrupt.

MiniportISR dismisses the interrupt on the network adapter, saves whatever state it must about the interrupt, and defers as much of the I/O processing for each interrupt as possible to the MiniportHandleInterrupt function.

The remaining information in this reference page does not apply to Windows CE because the functionality is not supported. However, if portability to Microsoft® Windows® 2000 is a concern, the following information is provided.

After MiniportISR returns control with the variables at InterruptRecognized and QueueMiniportHandleInterrupt set to TRUE, the corresponding MiniportHandleInterrupt function runs at a lower hardware priority than that of the ISR. As a general rule, MiniportHandleInterrupt should do all the work for interrupt-driven I/O operations except for determining whether the network adapter actually generated the interrupt, and, if necessary, preserving the type (receive, send, reset) of interrupt.

However, a driver writer should not rely on a one-to-one correspondence between the execution of MiniportISR and MiniportHandleInterrupt. A MiniportHandleInterrupt function should be written to handle the I/O processing for more than one network adapter interrupt. Its MiniportISR and MiniportHandleInterrupt functions can run concurrently in SMP machines. Moreover, as soon as MiniportISR acknowledges a network adapter interrupt, the network adapter can generate another interrupt, while the MiniportHandleInterrupt DPC can be queued for execution once for such a sequence of interrupts.

The MiniportHandleInterrupt function is not queued if the driver's MiniportHalt or MiniportInitialize function is currently executing.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Externs.h.

See Also

MiniportHandleInterrupt | MiniportInitialize | MiniportHalt | NdisMRegisterInterrupt

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.