W_DISABLE_INTERRUPT_HANDLER callback function

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.

The MiniportDisableInterrupt function is optional, supplied by drivers of NICs that support dynamic enabling and disabling of interrupts but do not share an IRQ.

Syntax

W_DISABLE_INTERRUPT_HANDLER MiniportDisableInterrupt;

VOID MiniportDisableInterrupt(
  _In_ NDIS_HANDLE MiniportAdapterContext
)
{ ... }

Parameters

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

Return value

None

Remarks

MiniportDisableInterrupt typically disables interrupts by writing a mask to the NIC. If a driver does not have this function, typically its MiniportISR disables interrupts on the NIC.

If its NIC does not support dynamic enabling and disabling of interrupts or if it shares an IRQ, the NIC driver must register a MiniportISR function and set RequestIsr to TRUE when it calls NdisMRegisterMiniport. Such a driver's MiniportISR function must acknowledge each interrupt generated by the NIC and save any necessary interrupt information for the driver's MiniportHandleInterrupt function.

MiniportDisableInterrupt runs at DIRQL, in particular at the DIRQL assigned when the NIC driver's MiniportInitialize function called NdisMRegisterInterrupt. Therefore, MiniportDisableInterrupt can call only a subset of the NDIS library functions, such as the NdisRawXxx functions that are safe to call at any IRQL.

If MiniportDisableInterrupt shares resources, such as NIC registers, with another MiniportXxx that runs at a lower IRQL, that MiniportXxx must call NdisMSynchronizeWithInterrupt so the driver's MiniportSynchronizeISR function will access those shared resources in a synchronized and multiprocessor-safe manner. Otherwise, while it is accessing the shared resources, that MiniportXxx function can be preempted by MiniportDisableInterrupt, possibly undoing the work just done by MiniportXxx.

Requirements

Target platform

Desktop

Version

Not supported for NDIS 6.0 drivers in Windows Vista. Use MiniportDisableInterruptEx instead. Supported for NDIS 5.1 drivers in Windows Vista and Microsoft Windows XP.

Header

Ndis.h (include Ndis.h)

IRQL

DIRQL

See also

MiniportEnableInterrupt

MiniportHandleInterrupt

MiniportInitialize

MiniportISR

MiniportSynchronizeISR

NdisMRegisterInterrupt

NdisMSynchronizeWithInterrupt

 

 

Send comments about this topic to Microsoft