dm: virtio: set VBS-K status to VIRTIO_DEV_INIT_SUCCESS after reset
When reset VBS-K status should be set to VIRTIO_DEV_INIT_SUCCESS because at the time the char dev of VBS-K is still opened and when set_status callback is called later, it depends on VIRTIO_DEV_INIT_SUCCESS to resume. Signed-off-by: Jian Jun Chen <jian.jun.chen@intel.com> Reviewed-by: Shuo Liu <shuo.a.liu@intel.com> Acked-by: Yu Wang <yu1.wang@intel.com>
This commit is contained in:
parent
1378a8440a
commit
f63c7a7355
|
@ -195,7 +195,7 @@ virtio_audio_reset(void *base)
|
||||||
DPRINTF(("virtio_audio: VBS-K reset requested!\n"));
|
DPRINTF(("virtio_audio: VBS-K reset requested!\n"));
|
||||||
virtio_audio_kernel_stop(virt_audio);
|
virtio_audio_kernel_stop(virt_audio);
|
||||||
virtio_audio_kernel_reset(virt_audio);
|
virtio_audio_kernel_reset(virt_audio);
|
||||||
virt_audio->vbs_k.kstatus = VIRTIO_DEV_INITIAL;
|
virt_audio->vbs_k.kstatus = VIRTIO_DEV_INIT_SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -186,7 +186,7 @@ virtio_hyper_dmabuf_reset(void *base)
|
||||||
if (kstatus == VIRTIO_DEV_STARTED) {
|
if (kstatus == VIRTIO_DEV_STARTED) {
|
||||||
virtio_hyper_dmabuf_k_stop();
|
virtio_hyper_dmabuf_k_stop();
|
||||||
virtio_hyper_dmabuf_k_reset();
|
virtio_hyper_dmabuf_k_reset();
|
||||||
kstatus = VIRTIO_DEV_INITIAL;
|
kstatus = VIRTIO_DEV_INIT_SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -293,7 +293,7 @@ virtio_rnd_reset(void *base)
|
||||||
DPRINTF(("virtio_rnd: VBS-K reset requested!\n"));
|
DPRINTF(("virtio_rnd: VBS-K reset requested!\n"));
|
||||||
virtio_rnd_kernel_stop(rnd);
|
virtio_rnd_kernel_stop(rnd);
|
||||||
virtio_rnd_kernel_reset(rnd);
|
virtio_rnd_kernel_reset(rnd);
|
||||||
rnd->vbs_k.status = VIRTIO_DEV_INITIAL;
|
rnd->vbs_k.status = VIRTIO_DEV_INIT_SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue