summaryrefslogtreecommitdiff
path: root/sys/dev/pv/xen.c
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2016-11-29 14:55:05 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2016-11-29 14:55:05 +0000
commit0bd51f5aa863243923f6f17262ed851a2bb94240 (patch)
tree6b87f78c432ce899f26ede059cd287919075e148 /sys/dev/pv/xen.c
parent26160aeb8e70019cc5aa21506b154398da93b450 (diff)
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;
+}