xref: /netbsd-src/sbin/drvctl/drvctl.8 (revision a5847cc334d9a7029f6352b847e9e8d71a0f9e0c)
1.\" $NetBSD: drvctl.8,v 1.12 2011/08/07 13:00:35 jmcneill 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 August 7, 2011
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 nt
44.Fl l
45.Op Ar device
46.Nm
47.Fl p
48.Ar device
49.Op Ar property ...
50.Nm
51.Fl Q
52.Ar device
53.Nm
54.Fl R
55.Ar device
56.Nm
57.Fl S
58.Ar device
59.Sh DESCRIPTION
60The
61.Nm
62program works with the
63.Xr drvctl 4
64pseudo-driver, and allows to rescan busses and to detach
65drivers from devices.
66.Pp
67The following options are available:
68.Bl -tag -width 123456
69.It Fl a
70Give the interface attribute where children are to be
71attached to (and which defines the interpretation of
72the locator information).
73This will only be needed in rare cases where the bus
74has multiple attributes.
75.It Fl d
76Detach the device driver from the device given by the
77.Ar device
78argument.
79.It Fl l
80List the children of the device specified by the
81.Ar device
82argument.
83If
84.Ar device
85is not specified, list roots of the device tree instead.
86Output comes in two columns.
87The first column is
88.Ar device ,
89or
90.Dq root
91if
92.Ar device
93is not specified.
94The second column is the child.
95.It Fl n
96Suppress first column in
97.Fl l
98output.
99.It Fl p
100Get properties for the device specified by the
101.Ar device
102argument.
103If
104.Ar property
105is specified, the value of that property is printed, otherwise
106the properties are displayed as an XML property list.
107.It Fl Q
108Resume the ancestors of
109.Ar device ,
110.Ar device
111itself, and all of its descendants.
112.It Fl R
113Resume both the ancestors of
114.Ar device
115and
116.Ar device
117itself.
118.It Fl r
119Rescan the bus given by the
120.Ar busdevice
121argument.
122The scan range can be restricted by an optional
123.Ar locator
124list.
125.It Fl S
126Suspend both the descendants of
127.Ar device
128and
129.Ar device
130itself.
131.It Fl t
132Print a tree of devices in
133.Fl l
134output.
135.El
136.Sh FILES
137.Pa /dev/drvctl
138.Sh SEE ALSO
139.Xr proplib 3 ,
140.\" .Xr drvctl 4 ,
141.Xr autoconf 9
142.Sh BUGS
143Currently, there is no good way to get information about locator
144lengths and default values (which is present at kernel configuration
145time) out of a running kernel.
146Thus the locator handling is less intelligent as it could be.
147