2015-02-06 16:09:01 +00:00
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 2015 John Baldwin <jhb@FreeBSD.org>
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
|
|
|
.\" $FreeBSD$
|
|
|
|
.\"
|
2016-08-29 22:48:36 +00:00
|
|
|
.Dd August 29, 2016
|
2015-02-06 16:09:01 +00:00
|
|
|
.Dt DEVCTL 8
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm devctl
|
|
|
|
.Nd device control utility
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
|
|
|
.Cm attach
|
|
|
|
.Ar device
|
|
|
|
.Nm
|
2016-08-29 22:48:36 +00:00
|
|
|
.Cm clear driver
|
|
|
|
.Op Fl f
|
|
|
|
.Ar device
|
|
|
|
.Nm
|
2015-02-06 16:09:01 +00:00
|
|
|
.Cm detach
|
|
|
|
.Op Fl f
|
|
|
|
.Ar device
|
|
|
|
.Nm
|
|
|
|
.Cm disable
|
|
|
|
.Op Fl f
|
|
|
|
.Ar device
|
|
|
|
.Nm
|
|
|
|
.Cm enable
|
|
|
|
.Ar device
|
|
|
|
.Nm
|
|
|
|
.Cm suspend
|
|
|
|
.Ar device
|
|
|
|
.Nm
|
|
|
|
.Cm resume
|
|
|
|
.Ar device
|
|
|
|
.Nm
|
|
|
|
.Cm set driver
|
|
|
|
.Op Fl f
|
|
|
|
.Ar device driver
|
2016-04-27 16:29:03 +00:00
|
|
|
.Nm
|
|
|
|
.Cm rescan
|
|
|
|
.Ar device
|
2016-04-27 16:33:17 +00:00
|
|
|
.Nm
|
|
|
|
.Cm delete
|
|
|
|
.Op Fl f
|
|
|
|
.Ar device
|
2015-02-06 16:09:01 +00:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility adjusts the state of individual devices in the kernel's
|
|
|
|
internal device hierarchy.
|
|
|
|
Each invocation of
|
|
|
|
.Nm
|
|
|
|
consists of a single command followed by command-specific arguments.
|
|
|
|
Each command operates on a single device specified via the
|
|
|
|
.Ar device
|
|
|
|
argument.
|
|
|
|
The
|
|
|
|
.Ar device
|
|
|
|
may be specified either as the name of an existing device or as a
|
|
|
|
bus-specific address.
|
|
|
|
More details on supported address formats can be found in
|
|
|
|
.Xr devctl 3 .
|
|
|
|
.Pp
|
|
|
|
The following commands are supported:
|
|
|
|
.Bl -tag -width indent
|
|
|
|
.It Cm attach Ar device
|
|
|
|
Force the kernel to re-probe the device.
|
|
|
|
If a suitable driver is found,
|
|
|
|
it is attached to the device.
|
|
|
|
.It Xo Cm detach
|
|
|
|
.Op Fl f
|
|
|
|
.Ar device
|
|
|
|
.Xc
|
|
|
|
Detach the device from its current device driver.
|
|
|
|
If the
|
|
|
|
.Fl f
|
|
|
|
flag is specified,
|
|
|
|
the device driver will be detached even if the device is busy.
|
|
|
|
.It Xo Cm disable
|
|
|
|
.Op Fl f
|
|
|
|
.Ar device
|
|
|
|
.Xc
|
|
|
|
Disable a device.
|
|
|
|
If the device is currently attached to a device driver,
|
|
|
|
the device driver will be detached from the device,
|
|
|
|
but the device will retain its current name.
|
|
|
|
If the
|
|
|
|
.Fl f
|
|
|
|
flag is specified,
|
|
|
|
the device driver will be detached even if the device is busy.
|
|
|
|
.It Cm enable Ar device
|
|
|
|
Enable a device.
|
|
|
|
The device will probe and attach if a suitable device driver is found.
|
|
|
|
Note that this can re-enable a device disabled at boot time via a
|
|
|
|
loader tunable.
|
|
|
|
.It Cm suspend Ar device
|
|
|
|
Suspend a device.
|
|
|
|
This may include placing the device in a reduced power state.
|
2015-07-16 05:14:20 +00:00
|
|
|
.It Cm resume Ar device
|
2015-02-06 16:09:01 +00:00
|
|
|
Resume a suspended device to a fully working state.
|
|
|
|
.It Xo Cm set driver
|
|
|
|
.Op Fl f
|
|
|
|
.Ar device driver
|
|
|
|
.Xc
|
|
|
|
Force the device to use a device driver named
|
|
|
|
.Ar driver .
|
|
|
|
If the device is already attached to a device driver and the
|
|
|
|
.Fl f
|
|
|
|
flag is specified,
|
|
|
|
the device will be detached from its current device driver before it is
|
|
|
|
attached to the new device driver.
|
|
|
|
If the device is already attached to a device driver and the
|
|
|
|
.Fl f
|
|
|
|
flag is not specified,
|
|
|
|
the device will not be changed.
|
2016-08-29 22:48:36 +00:00
|
|
|
.It Xo Cm clear driver
|
|
|
|
.Op Fl f
|
|
|
|
.Ar device
|
|
|
|
.Xc
|
|
|
|
Clear a previously-forced driver name so that the device is able to use any
|
|
|
|
valid device driver.
|
|
|
|
After the previous name has been cleared,
|
|
|
|
the device is reprobed so that other device drivers may attach to it.
|
|
|
|
This can be used to undo an earlier
|
|
|
|
.Cm set driver
|
|
|
|
command.
|
|
|
|
If the device is currently attached to a device driver and the
|
|
|
|
.Fl f
|
|
|
|
flag is not specified,
|
|
|
|
the device will not be changed.
|
2016-04-27 16:29:03 +00:00
|
|
|
.It Cm rescan Ar device
|
|
|
|
Rescan a bus device checking for devices that have been added or
|
|
|
|
removed.
|
2016-04-27 16:33:17 +00:00
|
|
|
.It Xo Cm delete
|
|
|
|
.Op Fl
|
|
|
|
.Ar device
|
|
|
|
.Xc
|
|
|
|
Delete the device from the device tree.
|
|
|
|
If the
|
|
|
|
.Fl f
|
|
|
|
flag is specified,
|
|
|
|
the device will be deleted even if it is physically present.
|
|
|
|
This command should be used with care as a device that is deleted but present
|
|
|
|
can no longer be used unless the parent bus device rediscovers the device via
|
|
|
|
a rescan request.
|
2015-02-06 16:09:01 +00:00
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr devctl 3 ,
|
|
|
|
.Xr devinfo 8
|
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility first appeared in
|
2016-02-02 22:55:03 +00:00
|
|
|
.Fx 10.3 .
|