BOOLEAN
MiniportSynchronizeISR(
IN PVOID SynchronizeContext
);
MiniportSynchronizeISR is a required function if any NIC driver function that runs at less than DIRQL shares resources with that driver’s MiniportISR or MiniportDisableInterrupt function.
MiniportSynchronizeISR returns a Boolean with a driver-determined meaning that is propagated to the caller of NdisMSynchronizeWithInterrupt.
If any NIC driver function shares resources, such as device registers, with the driver’s MiniportISR or MiniportDisableInterrupt function, the driver function that runs, by default, at less than DIRQL cannot access those resources directly. If it attempted to access such shared resources directly, the lower priority function might be pre-empted by execution of MiniportISR or MiniportDisableInterrupt, which could change state out from under the lower priority driver function.
To synchronize access to such shared resources with MiniportISR or MiniportDisableInterrupt, lower priority driver functions must call NdisMSynchronizeWithInterrupt to have the driver’s MiniportSynchronizeISR function access those shared resources at DIRQL. Calling NdisMSynchronizeWithInterrupt prevents race conditions and deadlocks in such a NIC driver, particularly in SMP machines.
Any lower priority driver functions that share resources among themselves (but not with any function that runs at DIRQL) should use a spin lock to protect those shared resources.
MiniportSynchronizeISR runs at the DIRQL assigned when the driver’s MiniportInitialize function called NdisMRegisterInterrupt. Like any driver function that runs at DIRQL, MiniportSynchronizeISR should return control as quickly as possible, and it can call only those NdisXxx functions that are safe to call at any IRQL.
MiniportDisableInterrupt, MiniportInitialize, MiniportISR, NdisAllocateSpinLock, NdisMRegisterInterrupt, NdisMSynchronizeWithInterrupt, NdisRawReadPortBufferUchar, NdisRawReadPortBufferUlong, NdisRawReadPortBufferUshort, NdisRawReadPortUchar, NdisRawReadPortUlong, NdisRawReadPortUshort, NdisRawWritePortBufferUchar, NdisRawWritePortBufferUlong, NdisRawWritePortBufferUshort, NdisRawWritePortUchar, NdisRawWritePortUlong, NdisRawWritePortUshort, NdisReadRegisterUchar, NdisReadRegisterUlong, NdisReadRegisterUshort, NdisWriteRegisterUchar, NdisWriteRegisterUlong, NdisWriteRegisterUshort