3 usbd \- Universal Serial Bus daemon
24 to provide USB I/O for device drivers.
25 It enumerates the bus, polling
26 hub ports to detect device attachments and detachments, performs
27 initial configuration of setup endpoints, and writes extra information into
29 endpoint control files, to ease device location.
33 opens all setup endpoints found at
35 (which correspond to built-in hubs initialized by the kernel during boot).
36 Paths to directories representing setup endpoints for hubs can be given
37 as arguments to restrict
39 operation to such hubs.
41 When a device is attached,
42 depending upon a configuration file compiled into
44 the appropriate device driver may be started without
46 This mechanism can be used to statically link some USB device drivers into
49 Initial configuration for setup endpoints is performed independently
50 of this configuration.
53 provides a file interface used to change debugging flags, and also used by
54 USB device drivers statically linked into
56 By default, the file system is mounted (after) at
58 and a 9P connection is posted at
61 Besides files provided by device drivers, the file
63 is always present in the file interface.
64 It accepts these control requests:
68 Sets the debugging level to
72 Sets the file system debugging level to
76 Prints the list of devices and file systems known by
81 recognizes the following options:
85 Print debugging diagnostics.
86 Repeating the option increases verbosity.
89 Print debugging diagnostics for the file system interface.
92 Mount the served file system at
96 Post a 9P connection at
102 can be configured to start drivers for devices matching one or more CSPs
103 (hex representation of USB class, subclass and protocol), class,
104 subclass, protocol, vendor id, or device id.
105 When a new device is attached,
107 scans the configuration and, if an entry matches the device descriptor, starts
109 If no driver is configured, the setup endpoint for the device is left
110 configured to let the user start the driver by hand.
112 Configuration is via compilation
113 because one of the options is to embed (link) the driver into the
116 If the driver is embedded,
118 creates a process for it and calls its main entry point.
121 tries to locate the driver binary in
123 and creates a process to execute it.
125 The configuration file,
131 Each section includes lines to configure particular drivers.
132 A driver may have more than one line if necessary.
133 Each line includes the name of the
134 driver (the base name of the binary) and one or more attributes of the form
138 The following attributes exist:
143 may be the name of the class
144 or a number identifying the device class (using C syntax).
145 The following class names are known:
157 is the number of the device subclass.
161 is the number of the device protocol.
165 is the hexadecimal number describing the CSP for the device.
176 This must be the last field.
177 The value is the rest of the line,
178 and is supplied as arguments to the driver process.
181 Several environment variables can be used to alter the behaviour of
183 for example, for use in
186 sets a debug level (zero for no diagnostics and positive
187 values for increasing verbosity).
189 overrides the keyboard arguments as specified by the configuration file.
191 overrides the disk arguments in the same way.
193 This configuration file links
198 It arranges for the driver's entry point,
201 to be called for any device with CSPs matching either
207 will be supplied as command line arguments for
209 This configuration also arranges for
211 to start (with no arguments) whenever a device of class
217 kb csp=0x010103 csp=0x020103 args=-d
219 disk class=storage args=
225 9P connection to the driver file system.
228 mount point for the driver file system.
230 .B /sys/src/cmd/usb/usbd/usbdb
231 Configuration file deciding which devices are included into
233 and which ones are started automatically.
235 .B /sys/src/cmd/usb/usbd
242 is not supposed to be restarted.
245 Not heavily exercised yet.