diff options
author | Stefan Fritsch <sf@cvs.openbsd.org> | 2023-05-29 08:13:36 +0000 |
---|---|---|
committer | Stefan Fritsch <sf@cvs.openbsd.org> | 2023-05-29 08:13:36 +0000 |
commit | 3dcb8475e9114c1a40e36f9fad1c2667966681b6 (patch) | |
tree | 218605bf798f5d2db922381b17971f1b211610b4 /sys/dev/fdt | |
parent | 835d28aa8fba8549103100ac7ee520e08e67a81d (diff) |
virtio: Set DRIVER_OK earlier
The DRIVER_OK bit must be set before using any virt-queues. To allow
virtio device drivers to use the virt-queues in their attach functions,
set the bit there and not in the virtio transport attach function. Only
vioscsi and viogpu really need this, but let's only have one standard
way to do this.
Noticed because of hangs with vioscsi on qemu/windows and in the Oracle
cloud. With much debugging help by Aaron Mason.
Also revert vioscsi.c 1.31 "Temporarily workaround double calls into
vioscsi_req_done()"
ok krw@
Diffstat (limited to 'sys/dev/fdt')
-rw-r--r-- | sys/dev/fdt/virtio_mmio.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/dev/fdt/virtio_mmio.c b/sys/dev/fdt/virtio_mmio.c index 12f5a6cdeb6..4f1e9eba9b7 100644 --- a/sys/dev/fdt/virtio_mmio.c +++ b/sys/dev/fdt/virtio_mmio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: virtio_mmio.c,v 1.10 2021/10/24 17:52:27 mpi Exp $ */ +/* $OpenBSD: virtio_mmio.c,v 1.11 2023/05/29 08:13:35 sf Exp $ */ /* $NetBSD: virtio.c,v 1.3 2011/11/02 23:05:52 njoly Exp $ */ /* @@ -293,7 +293,6 @@ virtio_mmio_attach(struct device *parent, struct device *self, void *aux) goto fail_2; } - virtio_set_status(vsc, VIRTIO_CONFIG_DEVICE_STATUS_DRIVER_OK); return; fail_2: |