15.1 Unload Routine Requirements
Any NT driver that can be replaced, or unloaded and reloaded, while Windows NTŪ is running must have an Unload routine.
NT drivers for video, keyboard, or mouse devices, and for mass-storage devices that can hold the system page file currently do not have Unload routines because these types of devices must be available while the current system is running. Higher-level NT drivers layered above these device drivers also do not have Unload routines.
Like every DriverEntry routine, an Unload routine runs at IRQL PASSIVE_LEVEL and is called in the context of a system thread.
In general, the process of unloading a driver is a synchronous operation.