summaryrefslogtreecommitdiff
path: root/sys/man/4
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2014-06-28 18:09:43 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2014-06-28 18:09:43 +0200
commit4275c49e72544d5b92512e41ddecbd6af5bee6c3 (patch)
tree22d66cc1e3286e69f50cc676e3c8e7fbd4b0636a /sys/man/4
parentd8c75e45de9483881f782be0b5e7113e625db571 (diff)
nusb: implement aijus stable uniqueue device names
instead of naming devices by ther dynamically assigned device address, we hash device uniqueue fields from the device descriptor and produce a 5 digit hex string that will identify the device across machines. when there is a collision (less than 1% chance with 100 devices), usbd will append the device address to the name to make it uniqueue for this machine. the hname is passed to drivers in the devid argument, which now has the form addr:hname, where the colon and hname can be omited (for backwards compatibility). when the new behaviour isnt desired, nousbhname= environment variable can be defined giving the old behaviour.
Diffstat (limited to 'sys/man/4')
-rw-r--r--sys/man/4/nusb45
1 files changed, 30 insertions, 15 deletions
diff --git a/sys/man/4/nusb b/sys/man/4/nusb
index efcc95eab..fc5d16e42 100644
--- a/sys/man/4/nusb
+++ b/sys/man/4/nusb
@@ -88,23 +88,41 @@ attachment. It provides a filesystem with the file
.B usbevent
(usually seen as
.BR /dev/usbevent )
-which, when read, returns a 5 column, space separated line of
+which, when read, returns a 6 column, space separated line of
text, one for each event. The columns are:
.B attach
or
.B detach
-.I devid
+followed by
+.I addr
.I vid
.I did
+.I csp
and
-.I csp .
-All but
-.I devid
-are formatted as 4 digit hexadecimal. This file is read by
+.I hname .
+The
+.I addr
+is the decimal device address assigned.
+.I Vid
+and
+.I did
+are formatted as 4 digit hexadecimal.
+.I Csp
+is the device class, subclass, protocol indentifier
+formatd as 6 digit hexadecimal.
+.I Usbd
+assigns a stable device uniqueue name based on the
+device descriptor for
+.I hname .
+This information is read by
.IR nusbrc (8)
and the
+.I addr
+and
+.I hname
+are passed to a suitable driver as
.I devid
-is passed to a suitable driver.
+in the form \fIaddr\fB:\fIhname
.SS Keyboards and mice
.I Kb
supports USB keyboards and mice either as separate USB devices
@@ -123,13 +141,10 @@ configures and manages USB mass storage devices. It
provides a file system (usually seen under
.BR /dev )
that includes one directory per storage device, named
-.BI sdU N . M
-in correspondence with the usb device number and the storage
-unit number (or LUN).
-For example, LUN number 2 on
-.B /dev/usb/ep3.0
-can be accessed through
-.BR /dev/sdU3.2 .
+.BI sdU N [. M ]
+in correspondence with the usb device uniqueue name
+and the storage unit number (or LUN). The LUN is omited
+for single lun devices.
.PP
The storage device directory contains the usual files
served by
@@ -183,7 +198,7 @@ provides a file system (usually seen under
that includes one directory per USB serial port, named
.BI eiaU N
or
-.BI eiaU N . M.
+.BI eiaU N [. M ].
In this directory there are two files,
.BR eiaU ,
similar to