2011-08-07 16:00:11 +04:00
|
|
|
.\" $NetBSD: drvctl.8,v 1.11 2011/08/07 12:00:11 jmcneill Exp $
|
2004-08-18 16:30:01 +04:00
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 2004
|
|
|
|
.\" Matthias Drochner. 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.
|
|
|
|
.\"
|
2011-08-07 16:00:11 +04:00
|
|
|
.Dd August 7, 2011
|
2004-08-18 16:30:01 +04:00
|
|
|
.Dt DRVCTL 8
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm drvctl
|
|
|
|
.Nd tool to rescan busses and detach devices on user request
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
|
|
|
.Fl r
|
|
|
|
.Op Fl a Ar attribute
|
|
|
|
.Ar busdevice
|
|
|
|
.Op locator ...
|
|
|
|
.Nm
|
|
|
|
.Fl d
|
|
|
|
.Ar device
|
2006-09-22 08:37:36 +04:00
|
|
|
.Nm
|
2009-04-21 02:05:47 +04:00
|
|
|
.Op Fl n
|
2008-02-16 05:00:37 +03:00
|
|
|
.Fl l
|
2009-04-05 02:05:47 +04:00
|
|
|
.Op Ar device
|
2008-02-16 05:00:37 +03:00
|
|
|
.Nm
|
2006-09-22 08:37:36 +04:00
|
|
|
.Fl p
|
|
|
|
.Ar device
|
2011-08-07 16:00:11 +04:00
|
|
|
.Op Ar property ...
|
2008-02-16 05:00:37 +03:00
|
|
|
.Nm
|
|
|
|
.Fl Q
|
|
|
|
.Ar device
|
|
|
|
.Nm
|
|
|
|
.Fl R
|
|
|
|
.Ar device
|
|
|
|
.Nm
|
|
|
|
.Fl S
|
|
|
|
.Ar device
|
2004-08-18 16:30:01 +04:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
program works with the
|
|
|
|
.Xr drvctl 4
|
|
|
|
pseudo-driver, and allows to rescan busses and to detach
|
|
|
|
drivers from devices.
|
|
|
|
.Pp
|
|
|
|
The following options are available:
|
|
|
|
.Bl -tag -width 123456
|
|
|
|
.It Fl a
|
|
|
|
Give the interface attribute where children are to be
|
|
|
|
attached to (and which defines the interpretation of
|
|
|
|
the locator information).
|
|
|
|
This will only be needed in rare cases where the bus
|
|
|
|
has multiple attributes.
|
|
|
|
.It Fl d
|
|
|
|
Detach the device driver from the device given by the
|
|
|
|
.Ar device
|
|
|
|
argument.
|
2008-02-16 05:00:37 +03:00
|
|
|
.It Fl l
|
|
|
|
List the children of the device specified by the
|
|
|
|
.Ar device
|
|
|
|
argument.
|
2009-04-05 02:05:47 +04:00
|
|
|
If
|
|
|
|
.Ar device
|
2009-04-21 01:40:42 +04:00
|
|
|
is not specified, list roots of the device tree instead.
|
|
|
|
Output comes in two columns.
|
|
|
|
The first column is
|
|
|
|
.Ar device ,
|
|
|
|
or
|
|
|
|
.Dq root
|
|
|
|
if
|
|
|
|
.Ar device
|
2009-04-21 02:04:57 +04:00
|
|
|
is not specified.
|
2009-04-21 01:40:42 +04:00
|
|
|
The second column is the child.
|
2009-04-21 02:07:23 +04:00
|
|
|
.It Fl n
|
|
|
|
Suppress first column in
|
|
|
|
.Fl l
|
|
|
|
output.
|
2006-09-22 08:37:36 +04:00
|
|
|
.It Fl p
|
2011-08-07 16:00:11 +04:00
|
|
|
Get properties for the device specified by the
|
2006-09-22 08:37:36 +04:00
|
|
|
.Ar device
|
|
|
|
argument.
|
2011-08-07 16:00:11 +04:00
|
|
|
If
|
|
|
|
.Ar property
|
|
|
|
is specified, the value of that property is printed, otherwise
|
|
|
|
the properties are displayed as an XML property list.
|
2008-02-16 05:00:37 +03:00
|
|
|
.It Fl Q
|
|
|
|
Resume the ancestors of
|
|
|
|
.Ar device ,
|
|
|
|
.Ar device
|
|
|
|
itself, and all of its descendants.
|
|
|
|
.It Fl R
|
|
|
|
Resume both the ancestors of
|
|
|
|
.Ar device
|
|
|
|
and
|
|
|
|
.Ar device
|
|
|
|
itself.
|
|
|
|
.It Fl r
|
|
|
|
Rescan the bus given by the
|
|
|
|
.Ar busdevice
|
|
|
|
argument.
|
|
|
|
The scan range can be restricted by an optional
|
|
|
|
.Ar locator
|
|
|
|
list.
|
|
|
|
.It Fl S
|
|
|
|
Suspend both the descendants of
|
|
|
|
.Ar device
|
|
|
|
and
|
|
|
|
.Ar device
|
|
|
|
itself.
|
2004-08-18 16:30:01 +04:00
|
|
|
.El
|
|
|
|
.Sh FILES
|
|
|
|
.Pa /dev/drvctl
|
|
|
|
.Sh SEE ALSO
|
2006-09-22 08:37:36 +04:00
|
|
|
.Xr proplib 3 ,
|
2007-03-10 23:32:26 +03:00
|
|
|
.\" .Xr drvctl 4 ,
|
2004-08-18 16:30:01 +04:00
|
|
|
.Xr autoconf 9
|
|
|
|
.Sh BUGS
|
|
|
|
Currently, there is no good way to get information about locator
|
|
|
|
lengths and default values (which is present at kernel configuration
|
2004-08-18 17:21:36 +04:00
|
|
|
time) out of a running kernel.
|
|
|
|
Thus the locator handling is less intelligent as it could be.
|