Skip to content

Commit f63c7a7

Browse files
chejianjlijinxia
authored andcommitted
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>
1 parent 1378a84 commit f63c7a7

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

devicemodel/hw/pci/virtio/virtio_audio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ virtio_audio_reset(void *base)
195195
DPRINTF(("virtio_audio: VBS-K reset requested!\n"));
196196
virtio_audio_kernel_stop(virt_audio);
197197
virtio_audio_kernel_reset(virt_audio);
198-
virt_audio->vbs_k.kstatus = VIRTIO_DEV_INITIAL;
198+
virt_audio->vbs_k.kstatus = VIRTIO_DEV_INIT_SUCCESS;
199199
}
200200
}
201201

devicemodel/hw/pci/virtio/virtio_hyper_dmabuf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ virtio_hyper_dmabuf_reset(void *base)
186186
if (kstatus == VIRTIO_DEV_STARTED) {
187187
virtio_hyper_dmabuf_k_stop();
188188
virtio_hyper_dmabuf_k_reset();
189-
kstatus = VIRTIO_DEV_INITIAL;
189+
kstatus = VIRTIO_DEV_INIT_SUCCESS;
190190
}
191191
}
192192

devicemodel/hw/pci/virtio/virtio_rnd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ virtio_rnd_reset(void *base)
293293
DPRINTF(("virtio_rnd: VBS-K reset requested!\n"));
294294
virtio_rnd_kernel_stop(rnd);
295295
virtio_rnd_kernel_reset(rnd);
296-
rnd->vbs_k.status = VIRTIO_DEV_INITIAL;
296+
rnd->vbs_k.status = VIRTIO_DEV_INIT_SUCCESS;
297297
}
298298
}
299299

0 commit comments

Comments
 (0)