IRQLs in Network Drivers
Every driver function called by NDIS runs at a system-determined IRQL (one of PASSIVE_LEVEL < DISPATCH_LEVEL < DIRQL). For example, a miniport driver's initialization function, halt function, reset function, and sometimes the shutdown function commonly run at PASSIVE_LEVEL. Interrupt code runs at DIRQL, so an NDIS intermediate or protocol driver never runs at DIRQL. All other NDIS driver functions run at IRQL <= DISPATCH_LEVEL.
The IRQL at which a driver function runs affects which NDIS functions it can call. Certain functions can be called only at IRQL = PASSIVE_LEVEL. Others can be called at DISPATCH_LEVEL or lower. You should check every NDIS function for IRQL restrictions.
Any driver function that shares resources with the driver's interrupt service routine (ISR) must be able to raise its IRQL to DIRQL to prevent race conditions. NDIS provides such a mechanism.
Build date: 5/21/2013