summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsf <sf@openbsd.org>2017-03-16 21:08:50 +0000
committersf <sf@openbsd.org>2017-03-16 21:08:50 +0000
commitebd2431fde099c6ee40b7f9aa78886881fddccf1 (patch)
treec23756ebc3c9ddc719c5deb607adab24dae74005
parentvioscsi: return XS_NO_CCB if out of space (diff)
downloadwireguard-openbsd-ebd2431fde099c6ee40b7f9aa78886881fddccf1.tar.xz
wireguard-openbsd-ebd2431fde099c6ee40b7f9aa78886881fddccf1.zip
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.
-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,