path: root/sys/sys
diff options
authorJohn Baldwin <jhb@FreeBSD.org>2016-08-29 22:48:36 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2016-08-29 22:48:36 +0000
commite05ec081fe81beb79567b82723bd045aa50f19c0 (patch)
tree49d4724d89f0eae45adf3d20810b4392775e83b1 /sys/sys
parenta3d5eb2481e8d136300b107d93c282e63bf36969 (diff)
Implement 'devctl clear driver' to undo a previous 'devctl set driver'.
Add a new 'clear driver' command for devctl along with the accompanying ioctl and devctl_clear_driver() library routine to reset a device to use a wildcard devclass instead of a fixed devclass. This can be used to undo a previous 'set driver' command. After the device's name has been reset to permit wildcard names, it is reprobed so that it can attach to newly-available (to it) device drivers. MFC after: 1 month Sponsored by: Chelsio Communications
Notes: svn path=/head/; revision=305034
Diffstat (limited to 'sys/sys')
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/sys/bus.h b/sys/sys/bus.h
index bb13a29f0913..9139edab4a96 100644
--- a/sys/sys/bus.h
+++ b/sys/sys/bus.h
@@ -117,6 +117,7 @@ struct devreq {
#define DEV_SUSPEND _IOW('D', 5, struct devreq)
#define DEV_RESUME _IOW('D', 6, struct devreq)
#define DEV_SET_DRIVER _IOW('D', 7, 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)
@@ -126,6 +127,9 @@ struct devreq {
/* Flags for DEV_SET_DRIVER. */
#define DEVF_SET_DRIVER_DETACH 0x0000001 /* Detach existing driver. */
+/* Flags for DEV_CLEAR_DRIVER. */
+#define DEVF_CLEAR_DRIVER_DETACH 0x0000001 /* Detach existing driver. */
/* Flags for DEV_DELETE. */
#define DEVF_FORCE_DELETE 0x0000001