path: root/sys/sys/bus.h
diff options
authorWarner Losh <imp@FreeBSD.org>2018-08-23 05:05:47 +0000
committerWarner Losh <imp@FreeBSD.org>2018-08-23 05:05:47 +0000
commit5fa29797910346fc0c54829bd979856e83b9b7ea (patch)
tree461c4837323a9d9612e2ccd14735ea250d763699 /sys/sys/bus.h
parent67b60a1b7d46d959bdd4925944b149eebbfb593f (diff)
Create devctl freeze/thaw.
This adds it to devctl, libdevctl, defines the two IOCTLs and implements the kernel bits. causes any new drivers that are added via kldload to be deferred until a 'thaw' comes in. These do not stack: it is an error to freeze while frozen, or thaw while thawed. Differential Revision: https://reviews.freebsd.org/D16735
Notes: svn path=/head/; revision=338233
Diffstat (limited to 'sys/sys/bus.h')
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/sys/bus.h b/sys/sys/bus.h
index ae643069eac3..a96cfc6c8f72 100644
--- a/sys/sys/bus.h
+++ b/sys/sys/bus.h
@@ -92,7 +92,8 @@ struct u_device {
#define DF_EXTERNALSOFTC 0x40 /* softc not allocated by us */
#define DF_REBID 0x80 /* Can rebid after attach */
#define DF_SUSPENDED 0x100 /* Device is suspended. */
-#define DF_QUIET_CHILDREN 0x200 /* Default to quiet for all my children */
+#define DF_QUIET_CHILDREN 0x200 /* Default to quiet for all my children */
+#define DF_NEEDNOMATCH 0x800 /* Has a pending NOMATCH event */
* @brief Device request structure used for ioctl's.
@@ -126,6 +127,8 @@ struct devreq {
#define DEV_CLEAR_DRIVER _IOW('D', 8, struct devreq)
#define DEV_RESCAN _IOW('D', 9, struct devreq)
#define DEV_DELETE _IOW('D', 10, struct devreq)
+#define DEV_FREEZE _IOW('D', 11, struct devreq)
+#define DEV_THAW _IOW('D', 12, struct devreq)
/* Flags for DEV_DETACH and DEV_DISABLE. */
#define DEVF_FORCE_DETACH 0x0000001