VOID
MiniportDisableInterrupt(
IN NDIS_HANDLE MiniportAdapterContext
);
MiniportDisableInterrupt is an optional function, supplied by drivers of NICs that support dynamic enabling and disabling of interrupts but do not share an IRQ.
Parameters
MiniportAdapterContext
Specifies the handle to a miniport-allocated context area in which the driver maintains per-NIC state, set up by MiniportInitialize.
Comments
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.
By default, 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 NdisMSychronizeWithInterrupt 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 pre-empted by MiniportDisableInterrupt, possibly undoing the work just done by MiniportXxx.
See Also
MiniportEnableInterrupt, MiniportHandleInterrupt, MiniportInitialize, MiniportISR, MiniportSynchronizeISR, NdisMRegisterInterrupt, NdisMSynchronizeWithInterrupt