xref: /netbsd/sbin/drvctl/drvctl.8 (revision 6550d01e)
1.\" $NetBSD: drvctl.8,v 1.10 2009/04/20 22:07:23 wiz Exp $
2.\"
3.\" Copyright (c) 2004
4.\" 	Matthias Drochner.  All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25.\" SUCH DAMAGE.
26.\"
27.Dd April 20, 2009
28.Dt DRVCTL 8
29.Os
30.Sh NAME
31.Nm drvctl
32.Nd tool to rescan busses and detach devices on user request
33.Sh SYNOPSIS
34.Nm
35.Fl r
36.Op Fl a Ar attribute
37.Ar busdevice
38.Op locator ...
39.Nm
40.Fl d
41.Ar device
42.Nm
43.Op Fl n
44.Fl l
45.Op Ar device
46.Nm
47.Fl p
48.Ar device
49.Nm
50.Fl Q
51.Ar device
52.Nm
53.Fl R
54.Ar device
55.Nm
56.Fl S
57.Ar device
58.Sh DESCRIPTION
59The
60.Nm
61program works with the
62.Xr drvctl 4
63pseudo-driver, and allows to rescan busses and to detach
64drivers from devices.
65.Pp
66The following options are available:
67.Bl -tag -width 123456
68.It Fl a
69Give the interface attribute where children are to be
70attached to (and which defines the interpretation of
71the locator information).
72This will only be needed in rare cases where the bus
73has multiple attributes.
74.It Fl d
75Detach the device driver from the device given by the
76.Ar device
77argument.
78.It Fl l
79List the children of the device specified by the
80.Ar device
81argument.
82If
83.Ar device
84is not specified, list roots of the device tree instead.
85Output comes in two columns.
86The first column is
87.Ar device ,
88or
89.Dq root
90if
91.Ar device
92is not specified.
93The second column is the child.
94.It Fl n
95Suppress first column in
96.Fl l
97output.
98.It Fl p
99Get the properties for the device specified by the
100.Ar device
101argument.
102The properties are displayed as an XML property list.
103.It Fl Q
104Resume the ancestors of
105.Ar device ,
106.Ar device
107itself, and all of its descendants.
108.It Fl R
109Resume both the ancestors of
110.Ar device
111and
112.Ar device
113itself.
114.It Fl r
115Rescan the bus given by the
116.Ar busdevice
117argument.
118The scan range can be restricted by an optional
119.Ar locator
120list.
121.It Fl S
122Suspend both the descendants of
123.Ar device
124and
125.Ar device
126itself.
127.El
128.Sh FILES
129.Pa /dev/drvctl
130.Sh SEE ALSO
131.Xr proplib 3 ,
132.\" .Xr drvctl 4 ,
133.Xr autoconf 9
134.Sh BUGS
135Currently, there is no good way to get information about locator
136lengths and default values (which is present at kernel configuration
137time) out of a running kernel.
138Thus the locator handling is less intelligent as it could be.
139