Date: Wed, 5 May 2010 12:18:41 +0300 From: Alexandr Rybalko <ray@dlink.ua> To: Milan Obuch <freebsd-usb@dino.sk> Cc: Andrew Thompson <thompsa@freebsd.org>, freebsd-usb@freebsd.org Subject: Re: USB serial device naming Message-ID: <20100505121841.ce3cf358.ray@dlink.ua> In-Reply-To: <201005051046.31093.freebsd-usb@dino.sk> References: <43EC7D78-31E5-4B86-9316-002AE650727A@tlb.org> <201005042027.o44KRete011712@lava.sentex.ca> <201005050952.15632.hselasky@c2i.net> <201005051046.31093.freebsd-usb@dino.sk>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, On Wed, 5 May 2010 10:46:30 +0200 Milan Obuch <freebsd-usb@dino.sk> wrote: >> On Wednesday 05 May 2010 09:52:15 Hans Petter Selasky wrote: >> > Hi, >> > >> > Maybe you can make PR on the issue and assign it to USB. Currently there is >> > no way of knowing which /dev/cuaUXXX belongs to which USB device. Probably >> > we can add the USB bus and address number as a part of the device >> > coordinates. So that /dev/ugen1.1 only creates /dev/cuaU1.1.xxx entries. >> > And then we can also remove the current unit number allocation structure I >> > guess, if we use: >> > >> > /dev/cuaU1.1.<iface_number>.<optional_sub_modem_unit> >> > >> > The only problem is: Will we break any existing applications? >> > >> >> Well, yes, to some extent :) Problem with this naming convention is name >> changes with every port change - that is, if you pull USB cable out and plug >> it in another port. There was already some older thread about naming on >> freebsd-usb list (end of April 2009). But if devd receives all necessary >> informations in attach event, then it is possible to rewrite config files or >> create symlink in /dev directory or something like this to handle this >> situation. I think better way is use device connection path in name. User know to which port of hub they attach device, so name like /dev/cuaU.h0p1.h2p3 (root hub 0, port 1, hub 2, port 3 ) have all information user need and this name not changing between reboot`s. May by we have way make naming more simple, but we really need path somewhere in device name. >> >> > The second problem was that the USB attach event was generated before the >> > modem was probed and the umodem and other modem drivers do not provide any >> > information about their USB address in the pnpinfo. This can be fixed. >> > >> > Old pnpinfo: >> > >> > dev.ums.0.%pnpinfo: vendor=0x0 product=0x0 devclass=0x00 devsubclass=0x00 >> > sernum="" release=0x0200 intclass=0x03 intsubclass=0x01 >> > >> > Suggested new pnpinfo (which is available from devd.conf I guess) >> > >> > dev.ums.0.%pnpinfo: vendor=0x0 product=0x0 devclass=0x00 devsubclass=0x00 >> > sernum="" release=0x0200 intclass=0x03 intsubclass=0x01 bus=1 addr=2 >> > ifaceidx=0 >> > >> >> This would be good thing to do I think. Just a typo spot here - ums means USB >> mouse driver, I think, but this idea is worth evaluating. >> >> My sole concern is use somehow stable names for situations when more than one >> serial port (serial USB cable, u3g modem etc) is attached so each device is >> properly used in correct program. >> >> Regards, >> Milan >> _______________________________________________ >> freebsd-usb@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-usb >> To unsubscribe, send any mail to "freebsd-usb-unsubscribe@freebsd.org" -- Alexandr Rybalko <ray@dlink.ua> aka Alex RAY <ray@ddteam.net>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100505121841.ce3cf358.ray>