summaryrefslogtreecommitdiffstats
path: root/sys/dev/pv/xen.c
diff options
context:
space:
mode:
authormikeb <mikeb@openbsd.org>2016-11-29 14:55:04 +0000
committermikeb <mikeb@openbsd.org>2016-11-29 14:55:04 +0000
commite86eae2378e40a76308825d89cd1af8598207f3d (patch)
tree90bbba2b112385d116cfb8fcc552739c0aa15501 /sys/dev/pv/xen.c
parentCopyright and license (diff)
downloadwireguard-openbsd-e86eae2378e40a76308825d89cd1af8598207f3d.tar.xz
wireguard-openbsd-e86eae2378e40a76308825d89cd1af8598207f3d.zip
Stop exposing xen_softc to PV devices directly
Diffstat (limited to 'sys/dev/pv/xen.c')
-rw-r--r--sys/dev/pv/xen.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/sys/dev/pv/xen.c b/sys/dev/pv/xen.c
index d5a60e0edec..b5f73f025e7 100644
--- a/sys/dev/pv/xen.c
+++ b/sys/dev/pv/xen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xen.c,v 1.65 2016/11/29 13:55:33 mikeb Exp $ */
+/* $OpenBSD: xen.c,v 1.66 2016/11/29 14:55:04 mikeb Exp $ */
/*
* Copyright (c) 2015 Mike Belopuhov
@@ -1297,7 +1297,6 @@ xen_probe_devices(struct xen_softc *sc)
return (error);
}
for (j = 0; j < iov2_cnt; j++) {
- xa.xa_parent = sc;
xa.xa_dmat = &xen_bus_dma_tag;
strlcpy(xa.xa_name, (char *)iovp1[i].iov_base,
sizeof(xa.xa_name));
@@ -1344,13 +1343,21 @@ xen_disable_emulated_devices(struct xen_softc *sc)
sc->sc_dev.dv_xname);
return;
}
- if (sc->sc_flags & XSF_UNPLUG_IDE)
+ if (sc->sc_unplug & XEN_UNPLUG_IDE)
unplug |= XMI_UNPLUG_IDE;
- if (sc->sc_flags & XSF_UNPLUG_IDESEC)
+ if (sc->sc_unplug & XEN_UNPLUG_IDESEC)
unplug |= XMI_UNPLUG_IDESEC;
- if (sc->sc_flags & XSF_UNPLUG_NIC)
+ if (sc->sc_unplug & XEN_UNPLUG_NIC)
unplug |= XMI_UNPLUG_NIC;
if (unplug)
outw(XMI_PORT, unplug);
#endif /* __i386__ || __amd64__ */
}
+
+void
+xen_unplug_emulated(void *xsc, int what)
+{
+ struct xen_softc *sc = xsc;
+
+ sc->sc_unplug |= what;
+}