9srv Manual Collection/plan9/usbd(4) | 9srv Manual Collection/plan9/usbd(4) |
---|
By default, usbd opens all setup endpoints found at #u/usb (which correspond to built-in hubs initialized by the kernel during boot). Paths to directories representing setup endpoints for hubs can be given as arguments to restrict usbd operation to such hubs.
When a device is attached, depending upon a configuration file compiled into usbd , the appropriate device driver may be started without user intervention. This mechanism can be used to statically link some USB device drivers into usbd itself. Initial configuration for setup endpoints is performed independently of this configuration.
Usbd provides a file interface used to change debugging flags, and also used by USB device drivers statically linked into usbd. By default, the file system is mounted (after) at /dev and a 9P connection is posted at /srv/usb.
Besides files provided by device drivers, the file usbdctl is always present in the file interface. It accepts these control requests:
Usbd recognizes the following options:
Configuration is via compilation because one of the options is to embed (link) the driver into the usbd binary. If the driver is embedded, usbd creates a process for it and calls its main entry point. Otherwise, usbd tries to locate the driver binary in /bin/usb and creates a process to execute it.
The configuration file, usbdb, has two sections: embed and auto. Each section includes lines to configure particular drivers. A driver may have more than one line if necessary. Each line includes the name of the driver (the base name of the binary) and one or more attributes of the form
The following attributes exist:
Several environment variables can be used to alter the behaviour of usbd, for example, for use in plan9.ini(8). usbdebug sets a debug level (zero for no diagnostics and positive values for increasing verbosity). kbargs overrides the keyboard arguments as specified by the configuration file. diskargs overrides the disk arguments in the same way.
Not heavily exercised yet.
9srv Manual Collection/plan9/usbd(4) | Rev: Tue May 26 19:14:02 BST 2009 |