Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Sep 2010 09:51:08 +0200
From:      Nick Hibma <nick@van-laarhoven.org>
To:        Hans Petter Selasky <hselasky@c2i.net>
Cc:        freebsd-usb@freebsd.org
Subject:   Re: USB serial device naming
Message-ID:  <598B1BC2-3B47-4188-A637-1831C49477B3@van-laarhoven.org>
In-Reply-To: <201009080900.46802.hselasky@c2i.net>
References:  <43EC7D78-31E5-4B86-9316-002AE650727A@tlb.org> <20100505121841.ce3cf358.ray@dlink.ua> <03EA4629-81F5-442C-9064-95E1A265D8AD@van-laarhoven.org> <201009080900.46802.hselasky@c2i.net>

next in thread | previous in thread | raw e-mail | index | archive | help
>> Two things are needed:
>>=20
>> 1) path to the device so you can distinguish two identical devices.
>>=20
>> 2) map u3gN to cuaUX.Y
>>=20
>> My problem is the latter:
>>=20
>> Processing event '+u3g0 vendor=3D0x0af0 product=3D0x7601 =
devclass=3D0xff
>> devsubclass=3D0xff sernum=3D"" release=3D0x0000 intclass=3D0xff =
intsubclass=3D0xff
>> at port=3D2 interface=3D0 vendor=3D0x0af0 product=3D0x7601 =
devclass=3D0xff
>> devsubclass=3D0xff sernum=3D"" release=3D0x0000 intclass=3D0xff =
intsubclass=3D0xff
>> on uhub1' Pushing table
>=20
> Hi,
>=20
>> How do I get to the cuaU10.0 device here? As far as I can see there =
is no
>> way to do this.
>=20
> I think we should use the following format:
>=20
> cuaU<bus>.<addr>.<iface>[.<sub_unit>]
>=20
> Then you can match by ugenX.Y unit. Possibly we could add this =
information to=20
> the processing event.

Yes. We need a mapping from vendor/product/rev -> /dev/ entry and from =
location -> /dev/ entry. Adding this cuaU<bus>.<addr>.<iface> string =
(not the absence of the sub_unit) to the event would resolve both issues =
1) and 2).

/me starts handing out paint and pencils for the bike shed painting to =
come...

>> The main problem is the strange way the minor number is assigned to =
the
>> cuaU device. But having the major and minor numbers for the cuaU =
device
>> per u3g instance would be sufficient. Through a sysctl for example, =
or as
>> extra information in the attach.
>=20
> You mean in the device name, not in the inode?

Device name, right. The mknod stuff is too old to be wrong...

> Please send a patch for review.

Will do in the next two weeks.

Nick=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?598B1BC2-3B47-4188-A637-1831C49477B3>