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