[prev in list] [next in list] [prev in thread] [next in thread]
List: freebsd-arch
Subject: Opinions about using USB serial numbers - Patch
From: Bernd Walter <ticso () cicely12 ! cicely ! de>
Date: 2004-03-23 17:21:44
Message-ID: 20040323172142.GF63452 () cicely12 ! cicely ! de
[Download RAW message or body]
On Mon, Mar 22, 2004 at 04:16:48PM +0100, Bernd Walter wrote:
> On Mon, Mar 22, 2004 at 01:30:49PM +0100, Bernd Walter wrote:
> > What still puzzles me is why only the nomatch event includes pnpinfo.
>
> I've found the code in subr_bus and it looks very intentionally to me.
> Should I move the serial number into the location string?
> Or can we add the pnpinfo to attach/detach messages as well?
I just added pnpinfo to attach/detach messages as well and I managed to
get devd to create the required symlinks:
Processing event '+ubser0 vendor=0x03da product=0x0001 devclass=0x00 devsubclass=0x00 \
sernum="1080054842" intclass=0xff intsubclass=0x00 at port=3 interface=0 on uhub3' \
Pushing table device-name=ubser0
vendor=0x03da
product=0x0001
devclass=0x00
devsubclass=0x00
sernum=1080054842
intclass=0xff
intsubclass=0x00
Processing attach event
Testing device-name=ubser0 against ^ed50
Testing device-name=ubser0 against ^ubser[0-9]+
Executing '/etc/devd/ubser-start.sh ubser0 1080054842'
Popping table
Processing event '-ubser0 vendor=0x03da product=0x0001 devclass=0x00 devsubclass=0x00 \
sernum="" intclass=0xff intsubclass=0x00 at port=3 interface=0 on uhub3' Pushing \
table device-name=ubser0
vendor=0x03da
product=0x0001
devclass=0x00
devsubclass=0x00
sernum=
intclass=0xff
intsubclass=0x00
Processing detach event
Testing device-name=ubser0 against ^ed50
Testing device-name=ubser0 against ^ubser[0-9]+
Executing '/etc/devd/ubser-stop.sh ubser0 '
Popping table
[102]cicely13# ls -al /dev/ubser0.*
crw-rw---- 1 uucp dialer 233, 0 Mar 23 17:34 /dev/ubser0.0
crw-rw---- 1 uucp dialer 233, 1 Mar 23 17:34 /dev/ubser0.1
lrwxr-xr-x 1 root wheel 8 Mar 23 17:54 /dev/ubser.1080054842.0 -> ubser0.0
lrwxr-xr-x 1 root wheel 8 Mar 23 17:54 /dev/ubser.1080054842.1 -> ubser0.1
lrwxr-xr-x 1 root wheel 8 Mar 23 17:54 /dev/ubser.1080054842.2 -> ubser0.2
lrwxr-xr-x 1 root wheel 8 Mar 23 17:54 /dev/ubser.1080054842.3 -> ubser0.3
lrwxr-xr-x 1 root wheel 8 Mar 23 17:54 /dev/ubser.1080054842.4 -> ubser0.4
lrwxr-xr-x 1 root wheel 8 Mar 23 17:54 /dev/ubser.1080054842.5 -> ubser0.5
crw-rw---- 1 uucp dialer 233, 2 Mar 23 17:34 /dev/ubser0.2
crw-rw---- 1 uucp dialer 233, 3 Mar 23 17:34 /dev/ubser0.3
crw-rw---- 1 uucp dialer 233, 4 Mar 23 17:34 /dev/ubser0.4
crw-rw---- 1 uucp dialer 233, 5 Mar 23 17:34 /dev/ubser0.5
[103]cicely13# ls -al /dev/ubser0.*
ls: No match.
Exit 1
The detach message doesn't contain the serial since this is not cached
as the other values - however the device-name is enough to rm the links
at detach because we know they are pointing to ubser0.* nodes.
Since this is an interface level driver I should add the interface
number to the symlink name as well - but that's up to the one
configuring devd.
The patch is at http://www.bwct.de/usb-devd.patch
--
B.Walter BWCT http://www.bwct.de
ticso@bwct.de info@bwct.de
_______________________________________________
freebsd-arch@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic