Remove the noise. Accept the calm. Be ok .
: If the SurpriseRemovalOK flag is set to TRUE , the system assumes the device can be pulled out at any moment without causing a system crash (BSOD) or permanent data corruption. surpriseremovalok
When writing drivers for modern hardware, managing the PnP state transitions related to removal is vital. Remove the noise
: Your driver must support this specific PnP IRP (I/O Request Packet). Once received, the driver should stop all data transfers and wait for the subsequent IRP_MN_REMOVE_DEVICE . surpriseremovalok