Date: Mon, 14 Dec 2009 09:48:07 +0100 From: Hans Petter Selasky <hselasky@c2i.net> To: Ed Schouten <ed@80386.nl> Cc: freebsd-usb@freebsd.org Subject: Re: USB serial device naming Message-ID: <200912140948.08171.hselasky@c2i.net> In-Reply-To: <20091214074204.GW64905@hoeg.nl> References: <43EC7D78-31E5-4B86-9316-002AE650727A@tlb.org> <C56E01C7-B772-43F9-B5E1-2DBB2F04D4AE@tlb.org> <20091214074204.GW64905@hoeg.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 14 December 2009 08:42:04 Ed Schouten wrote: > Hello Trevor, > > * Trevor Blackwell <tlb@tlb.org> 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" > > > > <snip> > > > > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912140948.08171.hselasky>