From owner-freebsd-usb@FreeBSD.ORG Mon Dec 14 08:46:15 2009 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95130106566B for ; Mon, 14 Dec 2009 08:46:15 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe16.tele2.se [212.247.155.225]) by mx1.freebsd.org (Postfix) with ESMTP id 264A88FC1A for ; Mon, 14 Dec 2009 08:46:14 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=s3R5Xy8iAAAA:8 a=6I5d2MoRAAAA:8 a=YKBVzh_K6lbdwv6lF4cA:9 a=ksciu5rkS4OP27EGhqoA:7 a=IlXwXMWMWEHXgxBrl5xDhJ98jKQA:4 a=HMEDajeASh8A:10 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe16.swip.net (CommuniGate Pro SMTP 5.2.16) with ESMTPA id 587202230; Mon, 14 Dec 2009 09:46:13 +0100 From: Hans Petter Selasky To: Ed Schouten Date: Mon, 14 Dec 2009 09:48:07 +0100 User-Agent: KMail/1.11.4 (FreeBSD/9.0-CURRENT; KDE/4.2.4; i386; ; ) References: <43EC7D78-31E5-4B86-9316-002AE650727A@tlb.org> <20091214074204.GW64905@hoeg.nl> In-Reply-To: <20091214074204.GW64905@hoeg.nl> X-Face: (%:6u[ldzJ`0qjD7sCkfdMmD*RxpOwEEQ+KWt[{J#x6ow~JO:,zwp.(t; @Aq :4:&nFCgDb8[3oIeTb^'",;u{5{}C9>"PuY\)!=#\u9SSM-nz8+SR~B\!qBv MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200912140948.08171.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org 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: Mon, 14 Dec 2009 08:46:15 -0000 On Monday 14 December 2009 08:42:04 Ed Schouten wrote: > Hello Trevor, > > * Trevor Blackwell wrote: > > I can't seem to find a way to match USB serial ports & tty names. I > > have two serial USB devices, which I can distinguish easily from > > "usbconfig show_ifdrv" > > > > > > > > and they result in two ttys: > > /dev/cuaU0 > > /dev/cuaU1 > > Be sure to keep in mind: the `real' TTY devices are ttyU0 and ttyU1. The > cua* devices are callout devices, which unlike the tty* devices don't > wait for a carrier detect signal during open(). > > My opinion is that the USB serial driver shouldn't use a bitmask to keep > track of which unit number are available, because we've got a nice KPI > for that: > > http://www.freebsd.org/cgi/man.cgi?query=new_unrhdr > > Unfortunately I cannot answer your question. Hopefully Hans can. ;-) That's OK, but the real problem is that TTY is not a visible child of UPLCOM for example. I would suggest adding a new IOCTL or maybe you have a better idea, where we can pass the "device_get_nameunit()" string, and then TTY can store it and pass it to userland. Also TTY should have a printout in dmesg, which unit is create if this string is specified. --HPS