xref: /freebsd/usr.sbin/devctl/devctl.8 (revision a907c6914c5879870b2597a63253cea0a5b7bdb8)
164de8019SJohn Baldwin.\"
264de8019SJohn Baldwin.\" Copyright (c) 2015 John Baldwin <jhb@FreeBSD.org>
364de8019SJohn Baldwin.\" All rights reserved.
464de8019SJohn Baldwin.\"
564de8019SJohn Baldwin.\" Redistribution and use in source and binary forms, with or without
664de8019SJohn Baldwin.\" modification, are permitted provided that the following conditions
764de8019SJohn Baldwin.\" are met:
864de8019SJohn Baldwin.\" 1. Redistributions of source code must retain the above copyright
964de8019SJohn Baldwin.\"    notice, this list of conditions and the following disclaimer.
1064de8019SJohn Baldwin.\" 2. Redistributions in binary form must reproduce the above copyright
1164de8019SJohn Baldwin.\"    notice, this list of conditions and the following disclaimer in the
1264de8019SJohn Baldwin.\"    documentation and/or other materials provided with the distribution.
1364de8019SJohn Baldwin.\"
1464de8019SJohn Baldwin.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1564de8019SJohn Baldwin.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1664de8019SJohn Baldwin.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1764de8019SJohn Baldwin.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1864de8019SJohn Baldwin.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1964de8019SJohn Baldwin.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2064de8019SJohn Baldwin.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2164de8019SJohn Baldwin.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2264de8019SJohn Baldwin.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2364de8019SJohn Baldwin.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2464de8019SJohn Baldwin.\" SUCH DAMAGE.
2564de8019SJohn Baldwin.\"
2664de8019SJohn Baldwin.\" $FreeBSD$
2764de8019SJohn Baldwin.\"
28*a907c691SJohn Baldwin.Dd April 27, 2016
2964de8019SJohn Baldwin.Dt DEVCTL 8
3064de8019SJohn Baldwin.Os
3164de8019SJohn Baldwin.Sh NAME
3264de8019SJohn Baldwin.Nm devctl
3364de8019SJohn Baldwin.Nd device control utility
3464de8019SJohn Baldwin.Sh SYNOPSIS
3564de8019SJohn Baldwin.Nm
3664de8019SJohn Baldwin.Cm attach
3764de8019SJohn Baldwin.Ar device
3864de8019SJohn Baldwin.Nm
3964de8019SJohn Baldwin.Cm detach
4064de8019SJohn Baldwin.Op Fl f
4164de8019SJohn Baldwin.Ar device
4264de8019SJohn Baldwin.Nm
4364de8019SJohn Baldwin.Cm disable
4464de8019SJohn Baldwin.Op Fl f
4564de8019SJohn Baldwin.Ar device
4664de8019SJohn Baldwin.Nm
4764de8019SJohn Baldwin.Cm enable
4864de8019SJohn Baldwin.Ar device
4964de8019SJohn Baldwin.Nm
5064de8019SJohn Baldwin.Cm suspend
5164de8019SJohn Baldwin.Ar device
5264de8019SJohn Baldwin.Nm
5364de8019SJohn Baldwin.Cm resume
5464de8019SJohn Baldwin.Ar device
5564de8019SJohn Baldwin.Nm
5664de8019SJohn Baldwin.Cm set driver
5764de8019SJohn Baldwin.Op Fl f
5864de8019SJohn Baldwin.Ar device driver
59*a907c691SJohn Baldwin.Nm
60*a907c691SJohn Baldwin.Cm rescan
61*a907c691SJohn Baldwin.Ar device
6264de8019SJohn Baldwin.Sh DESCRIPTION
6364de8019SJohn BaldwinThe
6464de8019SJohn Baldwin.Nm
6564de8019SJohn Baldwinutility adjusts the state of individual devices in the kernel's
6664de8019SJohn Baldwininternal device hierarchy.
6764de8019SJohn BaldwinEach invocation of
6864de8019SJohn Baldwin.Nm
6964de8019SJohn Baldwinconsists of a single command followed by command-specific arguments.
7064de8019SJohn BaldwinEach command operates on a single device specified via the
7164de8019SJohn Baldwin.Ar device
7264de8019SJohn Baldwinargument.
7364de8019SJohn BaldwinThe
7464de8019SJohn Baldwin.Ar device
7564de8019SJohn Baldwinmay be specified either as the name of an existing device or as a
7664de8019SJohn Baldwinbus-specific address.
7764de8019SJohn BaldwinMore details on supported address formats can be found in
7864de8019SJohn Baldwin.Xr devctl 3 .
7964de8019SJohn Baldwin.Pp
8064de8019SJohn BaldwinThe following commands are supported:
8164de8019SJohn Baldwin.Bl -tag -width indent
8264de8019SJohn Baldwin.It Cm attach Ar device
8364de8019SJohn BaldwinForce the kernel to re-probe the device.
8464de8019SJohn BaldwinIf a suitable driver is found,
8564de8019SJohn Baldwinit is attached to the device.
8664de8019SJohn Baldwin.It Xo Cm detach
8764de8019SJohn Baldwin.Op Fl f
8864de8019SJohn Baldwin.Ar device
8964de8019SJohn Baldwin.Xc
9064de8019SJohn BaldwinDetach the device from its current device driver.
9164de8019SJohn BaldwinIf the
9264de8019SJohn Baldwin.Fl f
9364de8019SJohn Baldwinflag is specified,
9464de8019SJohn Baldwinthe device driver will be detached even if the device is busy.
9564de8019SJohn Baldwin.It Xo Cm disable
9664de8019SJohn Baldwin.Op Fl f
9764de8019SJohn Baldwin.Ar device
9864de8019SJohn Baldwin.Xc
9964de8019SJohn BaldwinDisable a device.
10064de8019SJohn BaldwinIf the device is currently attached to a device driver,
10164de8019SJohn Baldwinthe device driver will be detached from the device,
10264de8019SJohn Baldwinbut the device will retain its current name.
10364de8019SJohn BaldwinIf the
10464de8019SJohn Baldwin.Fl f
10564de8019SJohn Baldwinflag is specified,
10664de8019SJohn Baldwinthe device driver will be detached even if the device is busy.
10764de8019SJohn Baldwin.It Cm enable Ar device
10864de8019SJohn BaldwinEnable a device.
10964de8019SJohn BaldwinThe device will probe and attach if a suitable device driver is found.
11064de8019SJohn BaldwinNote that this can re-enable a device disabled at boot time via a
11164de8019SJohn Baldwinloader tunable.
11264de8019SJohn Baldwin.It Cm suspend Ar device
11364de8019SJohn BaldwinSuspend a device.
11464de8019SJohn BaldwinThis may include placing the device in a reduced power state.
1158947c298SJustin Hibbits.It Cm resume Ar device
11664de8019SJohn BaldwinResume a suspended device to a fully working state.
11764de8019SJohn Baldwin.It Xo Cm set driver
11864de8019SJohn Baldwin.Op Fl f
11964de8019SJohn Baldwin.Ar device driver
12064de8019SJohn Baldwin.Xc
12164de8019SJohn BaldwinForce the device to use a device driver named
12264de8019SJohn Baldwin.Ar driver .
12364de8019SJohn BaldwinIf the device is already attached to a device driver and the
12464de8019SJohn Baldwin.Fl f
12564de8019SJohn Baldwinflag is specified,
12664de8019SJohn Baldwinthe device will be detached from its current device driver before it is
12764de8019SJohn Baldwinattached to the new device driver.
12864de8019SJohn BaldwinIf the device is already attached to a device driver and the
12964de8019SJohn Baldwin.Fl f
13064de8019SJohn Baldwinflag is not specified,
13164de8019SJohn Baldwinthe device will not be changed.
132*a907c691SJohn Baldwin.It Cm rescan Ar device
133*a907c691SJohn BaldwinRescan a bus device checking for devices that have been added or
134*a907c691SJohn Baldwinremoved.
13564de8019SJohn Baldwin.El
13664de8019SJohn Baldwin.Sh SEE ALSO
13764de8019SJohn Baldwin.Xr devctl 3 ,
13864de8019SJohn Baldwin.Xr devinfo 8
13964de8019SJohn Baldwin.Sh HISTORY
14064de8019SJohn BaldwinThe
14164de8019SJohn Baldwin.Nm
14264de8019SJohn Baldwinutility first appeared in
1430fd00e0cSJohn Baldwin.Fx 10.3 .
144