From owner-freebsd-usb@FreeBSD.ORG Wed May 5 08:44:54 2010 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BA2FC106566B for ; Wed, 5 May 2010 08:44:54 +0000 (UTC) (envelope-from freebsd-usb@dino.sk) Received: from loki.netlab.sk (loki.netlab.sk [84.245.65.11]) by mx1.freebsd.org (Postfix) with ESMTP id 44A4C8FC0C for ; Wed, 5 May 2010 08:44:53 +0000 (UTC) Received: from fw1.dino.sk (fw1.dino.sk [84.245.95.252]) (AUTH: LOGIN milan, TLS: TLSv1/SSLv3,256bits,AES256-SHA) by loki.netlab.sk with esmtp; Wed, 05 May 2010 10:43:39 +0200 id 0002E187.4BE12FBB.00002CCC From: Milan Obuch To: freebsd-usb@freebsd.org Date: Wed, 5 May 2010 10:46:30 +0200 User-Agent: KMail/1.9.10 References: <43EC7D78-31E5-4B86-9316-002AE650727A@tlb.org> <201005042027.o44KRete011712@lava.sentex.ca> <201005050952.15632.hselasky@c2i.net> In-Reply-To: <201005050952.15632.hselasky@c2i.net> X-Face: #.82A~?`t~x[OKOO/VQ$LB:#W:[KnFgA8on=vx$ji1k|N(Jtn]{Rf:p1*Cd>=?iso-8859-1?q?*=5B=5B=0A=09UQMwF+?="+(H(z8O%>/7rv9J>j8s=K}WNeL,&3}Ay+\f,I|yW; xB7Ceq"9mH12,Sn4us|/>=?iso-8859-1?q?W=0A=09YPt=5E=3Fy=7DEm=3DX=5CKugpo=273?=>^t=xQWh&fxn&yTG\*B'Ult040wcquXk MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201005051046.31093.freebsd-usb@dino.sk> Cc: Andrew Thompson Subject: Re: USB serial device naming X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2010 08:44:54 -0000 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.. > > 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. > 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