1.\" $NetBSD: drvctl.8,v 1.6 2009/04/04 22:05:47 joerg 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 4, 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.Fl l 44.Op Ar device 45.Nm 46.Fl p 47.Ar device 48.Nm 49.Fl Q 50.Ar device 51.Nm 52.Fl R 53.Ar device 54.Nm 55.Fl S 56.Ar device 57.Sh DESCRIPTION 58The 59.Nm 60program works with the 61.Xr drvctl 4 62pseudo-driver, and allows to rescan busses and to detach 63drivers from devices. 64.Pp 65The following options are available: 66.Bl -tag -width 123456 67.It Fl a 68Give the interface attribute where children are to be 69attached to (and which defines the interpretation of 70the locator information). 71This will only be needed in rare cases where the bus 72has multiple attributes. 73.It Fl d 74Detach the device driver from the device given by the 75.Ar device 76argument. 77.It Fl l 78List the children of the device specified by the 79.Ar device 80argument. 81If 82.Ar device 83is not specified, query for roots of the device tree instead. 84.It Fl p 85Get the properties for the device specified by the 86.Ar device 87argument. 88The properties are displayed as an XML property list. 89.It Fl Q 90Resume the ancestors of 91.Ar device , 92.Ar device 93itself, and all of its descendants. 94.It Fl R 95Resume both the ancestors of 96.Ar device 97and 98.Ar device 99itself. 100.It Fl r 101Rescan the bus given by the 102.Ar busdevice 103argument. 104The scan range can be restricted by an optional 105.Ar locator 106list. 107.It Fl S 108Suspend both the descendants of 109.Ar device 110and 111.Ar device 112itself. 113.El 114.Sh FILES 115.Pa /dev/drvctl 116.Sh SEE ALSO 117.Xr proplib 3 , 118.\" .Xr drvctl 4 , 119.Xr autoconf 9 120.Sh BUGS 121Currently, there is no good way to get information about locator 122lengths and default values (which is present at kernel configuration 123time) out of a running kernel. 124Thus the locator handling is less intelligent as it could be. 125