diff options
author | jhb <jhb@FreeBSD.org> | 2016-09-30 22:05:47 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2016-09-30 22:05:47 +0000 |
commit | 96b406e9cc04e8c5edc75ab1cfb0edae6a57b9ab (patch) | |
tree | 35007123c9912c6cc8bff3312fac05355298a8f6 /sys/sys/bus.h | |
parent | a6368448347da338ea1adc921d086119490e1022 (diff) | |
download | FreeBSD-src-96b406e9cc04e8c5edc75ab1cfb0edae6a57b9ab.zip FreeBSD-src-96b406e9cc04e8c5edc75ab1cfb0edae6a57b9ab.tar.gz |
MFC 305034: Implement 'devctl clear driver' to undo a previous '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.
Sponsored by: Chelsio Communications
Diffstat (limited to 'sys/sys/bus.h')
-rw-r--r-- | sys/sys/bus.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/sys/bus.h b/sys/sys/bus.h index 1d5f683..e6091a5 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 |