30.01.2022 13:05, Dmitry Osipenko пишет: > Still nothing prevents interrupt handler to fire during the pause. > > What you actually need to do is to disable/enable interrupt. This will > prevent the interrupt racing and then pause/resume may look like this: Although, seems this won't work, unfortunately. I see now that device_pause() doesn't have might_sleep().