summaryrefslogtreecommitdiffstats
path: root/sys/sys/bus.h
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2012-04-11 20:57:41 +0000
committerjhb <jhb@FreeBSD.org>2012-04-11 20:57:41 +0000
commit294ae9574dbae2eb396badbd71d53759f665a50e (patch)
tree01fe2ebbcc44439ae8b4b463d26d707df4166b48 /sys/sys/bus.h
parent31bc0a8bff2a66718684b68012fa4be1ed30f522 (diff)
downloadFreeBSD-src-294ae9574dbae2eb396badbd71d53759f665a50e.zip
FreeBSD-src-294ae9574dbae2eb396badbd71d53759f665a50e.tar.gz
Allow device_busy() and device_unbusy() to be invoked while a device is
being attached. This is implemented by adding a new DS_ATTACHING state while a device's DEVICE_ATTACH() method is being invoked. A driver is required to not fail an attach of a busy device. The device's state will be promoted to DS_BUSY rather than DS_ACTIVE() if the device was marked busy during DEVICE_ATTACH(). Reviewed by: kib MFC after: 1 week
Diffstat (limited to 'sys/sys/bus.h')
-rw-r--r--sys/sys/bus.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sys/bus.h b/sys/sys/bus.h
index 1c16bd6..fff745c 100644
--- a/sys/sys/bus.h
+++ b/sys/sys/bus.h
@@ -52,6 +52,7 @@ struct u_businfo {
typedef enum device_state {
DS_NOTPRESENT = 10, /**< @brief not probed or probe failed */
DS_ALIVE = 20, /**< @brief probe succeeded */
+ DS_ATTACHING = 25, /**< @brief currently attaching */
DS_ATTACHED = 30, /**< @brief attach method called */
DS_BUSY = 40 /**< @brief device is open */
} device_state_t;
OpenPOWER on IntegriCloud