Could you place a debug printf and dump w->type, w->selected and
size of w->connections before above line of code?
When the kernel panics:
azalia0 at pci0 dev 27 function 0 "Intel 7 Series HD Audio" rev 0x04:
msi
w->type=4, w->selected=0, sizeof(w->connections)=8
w->type=3, w->selected=0, sizeof(w->connections)=8
w->type=4, w->selected=0, sizeof(w->connections)=8
w->type=3, w->selected=0, sizeof(w->connections)=8
w->type=4, w->selected=0, sizeof(w->connections)=8
w->type=3, w->selected=0, sizeof(w->connections)=8
w->type=4, w->selected=0, sizeof(w->connections)=8
w->type=3, w->selected=0, sizeof(w->connections)=8
w->type=3, w->selected=0, sizeof(w->connections)=8
w->type=-950993977, w->selected=-851706417, sizeof(w->connections)=8
kernel: protection fault trap, code=0
And when it doesn't:
azalia0 at pci0 dev 27 function 0 "Intel 7 Series HD Audio" rev 0x04:
msi
w->type=4, w->selected=0, sizeof(w->connections)=8
w->type=3, w->selected=0, sizeof(w->connections)=8
w->type=4, w->selected=0, sizeof(w->connections)=8
w->type=3, w->selected=0, sizeof(w->connections)=8
w->type=4, w->selected=0, sizeof(w->connections)=8
w->type=3, w->selected=0, sizeof(w->connections)=8
w->type=4, w->selected=0, sizeof(w->connections)=8
w->type=3, w->selected=0, sizeof(w->connections)=8
w->type=3, w->selected=0, sizeof(w->connections)=8
w->type=4, w->selected=1, sizeof(w->connections)=8
w->type=4, w->selected=0, sizeof(w->connections)=8
w->type=3, w->selected=0, sizeof(w->connections)=8
w->type=4, w->selected=1, sizeof(w->connections)=8
w->type=4, w->selected=0, sizeof(w->connections)=8
w->type=3, w->selected=0, sizeof(w->connections)=8
w->type=4, w->selected=0, sizeof(w->connections)=8
w->type=4, w->selected=0, sizeof(w->connections)=8
w->type=4, w->selected=0, sizeof(w->connections)=8
azalia0: codecs: VIA/0x8446, Intel/0x2806, using VIA/0x8446