Fix a KASSERT in iwm(4) being triggered for the wrong reason.
authorstsp <stsp@openbsd.org>
Tue, 8 Feb 2022 14:24:36 +0000 (14:24 +0000)
committerstsp <stsp@openbsd.org>
Tue, 8 Feb 2022 14:24:36 +0000 (14:24 +0000)
commitc065fca54cda14d0007fb25773dde99a599627ce
treeffcd33d35d0f61bbdd37a49eb094b4189cd7948a
parent73c890b11cb5816d6c56714d60c109e3d6ccdd6a
Fix a KASSERT in iwm(4) being triggered for the wrong reason.

iwm_wakeup() must initialize the task reference counter only if
resuming the device succeeds. Otherwise, the newstate task will
not be scheduled and hence the ref counter must remain at zero.

Problem observed by + ok kettenis@
sys/dev/pci/if_iwm.c