Microsoft Windows CE 3.0  

MiniportISR

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

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

VOID
MiniportISR(
OUT PBOOLEAN
InterruptRecognized
,
OUT PBOOLEAN
QueueMiniportHandleInterrupt
,
IN NDIS_HANDLE
MiniportAdapterContext
);

Parameters

InterruptRecognized
Points to a variable in which MiniportISRreturns whether the network adapter actually generated the interrupt. MiniportISRsets 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, MiniportISRshould return FALSE as quickly as possible whenever it determines that the network adapter did not interrupt.

QueueMiniportHandleInterrupt
Points to a variable that MiniportISRsets to TRUE if the MiniportHandleInterruptfunction should be called to complete the interrupt-driven I/O operation.

If the variable at InterruptRecognizedis set to FALSE, the value of this variable is irrelevant because MiniportHandleInterruptwill not be called.

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

Remarks

Any network adapter driver should do as little work as possible in its MiniportISRfunction, deferring I/O operations for each interrupt the network adapter generates to the MiniportHandleInterruptfunction. A network adapter driver's ISR is not re-entrant on Windows CE-Based devices, although two instantiations of a MiniportISRfunction 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.

MiniportISRis called under the following conditions:

  • An interrupt occurs on the network adapter while the driver's MiniportInitializeor MiniportHaltfunction 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, MiniportISRshould 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 MiniportInitializefunction called NdisMRegisterInterrupt.
  • Miniports that do not provide MiniportDisable/EnableInterrupt functionality must have their ISRs called on every interrupt.

    MiniportISRdismisses 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 MiniportHandleInterruptfunction.

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

    After MiniportISRreturns control with the variables at InterruptRecognizedand QueueMiniportHandleInterruptset to TRUE, the corresponding MiniportHandleInterruptfunction runs at a lower hardware priority than that of the ISR. As a general rule, MiniportHandleInterruptshould 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 MiniportISRand MiniportHandleInterrupt. A MiniportHandleInterruptfunction should be written to handle the I/O processing for more than one network adapter interrupt. Its MiniportISRand MiniportHandleInterruptfunctions can run concurrently in SMP machines. Moreover, as soon as MiniportISRacknowledges a network adapter interrupt, the network adapter can generate another interrupt, while the MiniportHandleInterruptDPC can be queued for execution once for such a sequence of interrupts.

    The MiniportHandleInterruptfunction is not queued if the driver's MiniportHaltor MiniportInitializefunction is currently executing.

    Requirements

    Runs on Versions Defined in Include Link to
    Windows CE OS 2.0 and later Ndis.h   Ndislib.lib
    Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

    See Also

    MiniportHandleInterrupt, MiniportInitialize, MiniportHalt, NdisMRegisterInterrupt