NdisMRegisterInterruptEx function

NDIS miniport drivers call the NdisMRegisterInterruptEx function to register an interrupt.

Syntax


NDIS_STATUS NdisMRegisterInterruptEx(
  _In_   NDIS_HANDLE MiniportAdapterHandle,
  _In_   NDIS_HANDLE MiniportInterruptContext,
  _In_   PNDIS_MINIPORT_INTERRUPT_CHARACTERISTICS MiniportInterruptCharacteristics,
  _Out_  PNDIS_HANDLE NdisInterruptHandle
);

Parameters

MiniportAdapterHandle [in]

The miniport adapter handle that NDIS passed to the MiniportInitializeEx function.

MiniportInterruptContext [in]

A pointer to a block of context information. The miniport driver allocates this memory to store information about the interrupt. NDIS passes the context information block in subsequent calls to other functions that are associated with the interrupt.

MiniportInterruptCharacteristics [in]

A pointer to an NDIS_MINIPORT_INTERRUPT_CHARACTERISTICS structure that the miniport driver created. The driver initializes this structure with handler entry points and configuration parameters that define the interrupt characteristics.

NdisInterruptHandle [out]

A pointer to an NDIS handle. NDIS writes the handle for the newly created interrupt object to the address that the NdisInterruptHandle pointer specifies.

Return value

NdisMRegisterInterruptEx can return one of the following values:

Return codeDescription
NDIS_STATUS_SUCCESS

NDIS initialized the interrupt object and supplied a valid interrupt handle at NdisInterruptHandle . NDIS claimed hardware resources and set up the functions that it calls when an interrupt occurs.

NDIS_STATUS_RESOURCES

NdisMRegisterInterruptEx failed due to insufficient resources.

NDIS_STATUS_XXX or NT_STATUS_XXX

The attempt to initialize the interrupt object failed for reasons other than those in the preceding list.

 

Remarks

A miniport driver must call NdisMRegisterInterruptEx from its MiniportInitializeEx function if it manages a NIC that generates interrupts.

MiniportInitializeEx must call the NdisMSetMiniportAttributes function before calling NdisMRegisterInterruptEx.

The miniport driver must specify entry points for the following interrupt service functions:

MiniportInterrupt

MiniportInterruptDPC

MiniportDisableInterruptEx

MiniportEnableInterruptEx

If the NIC supports message-signaled interrupts (MSI), the miniport driver should specify entry points for the following MSI service functions:

MiniportMessageInterrupt

MiniportMessageInterruptDPC

MiniportDisableMessageInterrupt

MiniportEnableMessageInterrupt

If a driver specifies entry points for MSI, it must also specify entry points for the non-MSI interrupt service functions. Also, if NdisMRegisterInterruptEx returns NDIS_STATUS_SUCCESS, the driver must examine the value of the InterruptType member of the NDIS_MINIPORT_INTERRUPT_CHARACTERISTICS structure to determine the type of interrupts NDIS granted. If NDIS cannot grant MSI support, it will grant support for line based interrupts.

When interrupts are enabled on the NIC, a driver's MiniportInterrupt(or MiniportMessageInterrupt) function can be called at any time after the driver calls NdisMRegisterInterruptEx, even before NdisMRegisterInterruptEx returns. Therefore, a driver should not call NdisMRegisterInterruptEx until it is ready to handle an interrupt.

Drivers call the NdisMDeregisterInterruptEx function to release resources that were previously allocated with NdisMRegisterInterruptEx.

Requirements

Version

Supported in NDIS 6.0 and later.

Header

Ndis.h (include Ndis.h)

IRQL

PASSIVE_LEVEL

DDI compliance rules

Init_DeRegisterInterrupt, Init_RegisterInterrupt, Irql_Interrupt_Function, NdisMDeregisterInterruptEx

See also

MiniportDisableInterruptEx
MiniportDisableMessageInterrupt
MiniportEnableInterruptEx
MiniportEnableMessageInterrupt
MiniportInitializeEx
MiniportInterrupt
MiniportInterruptDPC
MiniportMessageInterrupt
MiniportMessageInterruptDPC
NDIS_MINIPORT_INTERRUPT_CHARACTERISTICS
NdisMDeregisterInterruptEx
NdisMSetMiniportAttributes

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft