This driver is stable in 9. At some point, it became horribly unstable in -current. After thorpej's changes it seeems less unstable, it took several days for this to happen:
NetBSD r 9.99.63 NetBSD 9.99.63 (R) #6: Fri May 22 23:06:42 IST 2020 nia@r:/home/nia/src/sys/arch/amd64/compile/obj/R amd64 [several screens of iwm0: autoconfiguration error: unhandled firmware response nonsense] iwm0: autoconfiguration error: unhandled firmware response 0x6266 0x66/0xea27c rx ring 0[14] iwm0: autoconfiguration error: unhandled firmware response 0x64bc 0xbc/0xea54f rx ring 0[14] iwm0: autoconfiguration error: unhandled firmware response 0xc002 0x2/0xf1f2495f rx ring 8[163] iwm0: autoconfiguration error: unhandled firmware response 0xffff 0xff/0x80 rx ring 127[255] iwm0: autoconfiguration error: unhandled firmware response 0x6005 0x5/0xf2fbe968 rx ring 9[173] iwm0: autoconfiguration error: Some HCMDs skipped?: idx=173 queued=0 cur=45 panic: kernel diagnostic assertion "ring->queued > 0" failed: file "/home/nia/src/sys/dev/pci/if_iwm.c", line 4459 cpu0: Begin traceback... vpanic() at netbsd:vpanic+0x152 __x86_indirect_thunk_rax() at netbsd:__x86_indirect_thunk_rax iwm_softintr() at netbsd:iwm_softintr+0x130a softint_dispatch() at netbsd:softint_dispatch+0x2d0 cpu0: End traceback... fatal breakpoint trap in supervisor mode trap type 1 code 0 rip 0xffffffff8021f3d5 cs 0x8 rflags 0x202 cr2 0x7a75ab013002 ilevel 0x6 rsp 0xffff8280aaa60ef0 curlwp 0xffffa52c9fe31480 pid 0.3 lowest kstack 0xffff8280aaa5d2c0
