summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorStefan Fritsch <sf@cvs.openbsd.org>2017-03-16 21:08:51 +0000
committerStefan Fritsch <sf@cvs.openbsd.org>2017-03-16 21:08:51 +0000
commitca25d08645729bc2922115d6893f39a4c8396aef (patch)
treed4aa9b5ab2894c31e805889562cb484321243db8 /sys
parent12f03e0ab88ca16ca4065be735984b8220d4bf97 (diff)
vioscsi: Negotiate features during attach
While vioscsi does not support any virtio-scsi features, we need to call virtio_negotiate_features() in order to negotiate device-independent features like VIRTIO_F_RING_INDIRECT_DESC.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pv/vioscsi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/pv/vioscsi.c b/sys/dev/pv/vioscsi.c
index e9d18a14bee..4a0ab775c5b 100644
--- a/sys/dev/pv/vioscsi.c
+++ b/sys/dev/pv/vioscsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vioscsi.c,v 1.4 2017/03/16 21:08:03 sf Exp $ */
+/* $OpenBSD: vioscsi.c,v 1.5 2017/03/16 21:08:50 sf Exp $ */
/*
* Copyright (c) 2013 Google Inc.
*
@@ -129,6 +129,7 @@ vioscsi_attach(struct device *parent, struct device *self, void *aux)
vsc->sc_vqs = sc->sc_vqs;
vsc->sc_nvqs = nitems(sc->sc_vqs);
+ virtio_negotiate_features(vsc, 0, NULL);
uint32_t cmd_per_lun = virtio_read_device_config_4(vsc,
VIRTIO_SCSI_CONFIG_CMD_PER_LUN);
uint32_t seg_max = virtio_read_device_config_4(vsc,