]> git.lizzy.rs Git - plan9front.git/commit
vmx: reset virtio queue state on device reset
authorcinap_lenrek <cinap_lenrek@felloff.net>
Sun, 11 Jul 2021 12:12:51 +0000 (12:12 +0000)
committercinap_lenrek <cinap_lenrek@felloff.net>
Sun, 11 Jul 2021 12:12:51 +0000 (12:12 +0000)
commitad37339a1c39c90f51d273abe60f552d3900f752
tree28f44d5f2d92a807e4003d4ff0fdbef8444a7816
parentf58d99aa7a97ba5f79af89f38b78d5924d4e35a2
vmx: reset virtio queue state on device reset

when a virtio device gets reset, we have to also reset the device
shadow indices: availableidx and usedidx. for extra safetly,
we also reset the buffer descriptor table addresses.

this is accomplished by adding a vioqreset(VIOQueue*) function
that brings the queue to its initial reset state.

this fixes non functional ethernet after reboot(8).
sys/src/cmd/vmx/virtio.c