summaryrefslogtreecommitdiffstats
path: root/sys/sys/bus.h
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2015-02-05 22:42:44 +0000
committerjhb <jhb@FreeBSD.org>2015-02-05 22:42:44 +0000
commit5114ec1b5901da1209afc0a7ac35616908bdf0e0 (patch)
tree79bbff0e909cce20413c5d44e7af2fda06e5bfa1 /sys/sys/bus.h
parent49ba8ceb19505a0e0d49b2b436526bf135193ef9 (diff)
downloadFreeBSD-src-5114ec1b5901da1209afc0a7ac35616908bdf0e0.zip
FreeBSD-src-5114ec1b5901da1209afc0a7ac35616908bdf0e0.tar.gz
Expose the constants for internal new-bus device flags to userland. The
flag value is already exposed via dv_flags, just not the meaning of the flags themselves. Use these constants to annotate devices that are disabled or suspended in devinfo output.
Diffstat (limited to 'sys/sys/bus.h')
-rw-r--r--sys/sys/bus.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/sys/sys/bus.h b/sys/sys/bus.h
index b15a556..f15dd34 100644
--- a/sys/sys/bus.h
+++ b/sys/sys/bus.h
@@ -70,11 +70,22 @@ struct u_device {
char dv_pnpinfo[128]; /**< @brief Plug and play info */
char dv_location[128]; /**< @brief Where is the device? */
uint32_t dv_devflags; /**< @brief API Flags for device */
- uint16_t dv_flags; /**< @brief flags for dev date */
+ uint16_t dv_flags; /**< @brief flags for dev state */
device_state_t dv_state; /**< @brief State of attachment */
/* XXX more driver info? */
};
+/* Flags exported via dv_flags. */
+#define DF_ENABLED 0x01 /* device should be probed/attached */
+#define DF_FIXEDCLASS 0x02 /* devclass specified at create time */
+#define DF_WILDCARD 0x04 /* unit was originally wildcard */
+#define DF_DESCMALLOCED 0x08 /* description was malloced */
+#define DF_QUIET 0x10 /* don't print verbose attach message */
+#define DF_DONENOMATCH 0x20 /* don't execute DEVICE_NOMATCH again */
+#define DF_EXTERNALSOFTC 0x40 /* softc not allocated by us */
+#define DF_REBID 0x80 /* Can rebid after attach */
+#define DF_SUSPENDED 0x100 /* Device is suspended. */
+
#ifdef _KERNEL
#include <sys/queue.h>
OpenPOWER on IntegriCloud