Chmod 644 a few scripts in the tree.
[dragonfly.git] / usr.sbin / usbd / usbd.8
1 .\" Copyright (c) 1998 The NetBSD Foundation, Inc.
2 .\" All rights reserved.
3 .\"
4 .\" Author: Lennart Augustsson
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 .\" 3. All advertising materials mentioning features or use of this software
15 .\"    must display the following acknowledgement:
16 .\"        This product includes software developed by the NetBSD
17 .\"        Foundation, Inc. and its contributors.
18 .\" 4. Neither the name of The NetBSD Foundation nor the names of its
19 .\"    contributors may be used to endorse or promote products derived
20 .\"    from this software without specific prior written permission.
21 .\"
22 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
23 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
24 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
25 .\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
26 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 .\" POSSIBILITY OF SUCH DAMAGE.
33 .\"
34 .\" $NetBSD: usbd.8,v 1.2 1998/07/13 11:01:50 augustss Exp $
35 .\" $FreeBSD: src/usr.sbin/usbd/usbd.8,v 1.20 2003/05/04 22:13:00 murray Exp $
36 .\"
37 .Dd July 2, 2006
38 .Dt USBD 8
39 .Os
40 .Sh NAME
41 .Nm usbd
42 .Nd supervise USB attach/detach
43 .Sh SYNOPSIS
44 .Nm
45 .Op Fl c Ar configfile
46 .Op Fl d
47 .Op Fl e
48 .Op Fl f Ar device
49 .Op Fl n
50 .Op Fl t Ar timeout
51 .Op Fl v
52 .Sh DESCRIPTION
53 The
54 .Nm
55 utility handles USB device attachment and detachment.
56 The (multiple)
57 .Fl f Ar device
58 command line options specify which controllers it should handle.
59 Normally this option is not needed.
60 .Pp
61 If the
62 .Dq usb ,
63 .Dq ohci
64 and
65 .Dq uhci
66 modules are not loaded,
67 .Nm
68 will load them automatically.
69 .Pp
70 To handle the attachment and detachment of USB devices
71 .Nm
72 opens the
73 .Pa /dev/usb
74 device and reads events from it.
75 Whenever a device is attached or
76 detached the list of actions read from
77 .Pa /etc/usbd.conf
78 is searched for a matching entry.
79 If found, the corresponding action is
80 executed.
81 .Pp
82 The command line options are as follows:
83 .Bl -tag -width Ds
84 .It Fl c Ar filename
85 Name of configuration file.
86 The default is
87 .Pa /etc/usbd.conf .
88 .It Fl d
89 Enable debugging to the standard output,
90 and do not disassociate from the controlling terminal.
91 .It Fl e
92 Do one device tree exploration, no event queue handling and then exit.
93 .It Fl f Ar device
94 Specify the pathname of a USB controller device file.
95 The flag may be repeated to watch more than one USB controller.
96 The default is
97 .Pa /dev/usb0
98 through
99 .Pa /dev/usb3 .
100 Do not specify the device
101 .Pa /dev/usb
102 here.
103 It is used for events only.
104 .It Fl n
105 Do not handle the event queue on /dev/usb.
106 .It Fl t Ar timeout
107 Set the timeout interval (in seconds) before an exploration happens
108 without being triggered by a connect or disconnect.
109 A timeout of 0 means that there is no timeout.  The default is 30.
110 .It Fl v
111 Be verbose.
112 Repeating the flag makes
113 .Nm
114 more verbose.
115 .El
116 .Sh FILES
117 .Bl -tag -width /etc/usbd.conf -compact
118 .It Pa /etc/usbd.conf
119 .It Pa /dev/usb
120 .It Pa /dev/usb0
121 .It Pa /dev/usb1
122 .It etc .
123 .El
124 .Sh SEE ALSO
125 .Xr usb 4 ,
126 .Xr usbd.conf 5
127 .Sh HISTORY
128 The
129 .Nm
130 utility appeared in
131 .Nx 1.4 .
132 .Sh AUTHORS
133 .An -nosplit
134 The
135 .Nm
136 driver was written by
137 .An Lennart Augustsson Aq Mt augustss@carlstedt.se
138 for the
139 .Nx
140 project.
141 The event queue handling in
142 .Nm
143 was added by
144 .An Nick Hibma Aq Mt n_hibma@FreeBSD.org .