Subject: Re: TTY virtualization driver
To: NetBSD Kernel Technical Discussion List <tech-kern@NetBSD.ORG>
From: Greg A. Woods <woods@weird.com>
List: tech-kern
Date: 01/24/2002 22:57:24
[ On Thursday, January 24, 2002 at 18:02:36 (-0800), Jason R Thorpe wrote: ]
> Subject: Re: TTY virtualization driver
>
> So what happens when you plop another 8-port card in there?
> 
> Let's say you plop it into the next PCI slot on your mainboard.  Let's
> say that that PCI slot happens to have a lower device number (this is
> pretty common).  Now suddenly you have:
> 
> 	tty00		on-board
> 	tty01		on-board
> 	tty02-tty09	new board
> 	tty10-tty17	previously existing board
> 
> So, if you want to nail down all your unit numbers, you still have to
> build a new kernel to nail them down.

Yup.  So goes it with *BSD kernel autoconf -- just like with /dev/sd*.

In this case though you might get what you imply you want just by
swapping the cards.....  :-)

That's certainly what I'd try first if I hadn't previously locked down
my kernel config.

On more logically designed systems the problem wouldn't arrise unless
you happened to pull just the lower-addressed N-port card from a system
with several serial port cards and replace it with a Y-port card.  Then
the ports on the untouched cards would move around unless you had
previously wired them down in your kernel configuration.

(What we're really making an argument for here is something along the
lines of the FreeBSD style of dynamic kernel reconfiguration (options
USERCONFIG) so that one doesn't have to build a new kernel just to
adjust the way it autoconfigures itself!  :-)


> The zstty thing exists because, on Suns, the 2 of the ports provided by
> one of the 8530s is not a serial port from the user perspective, but
> rather the interface used for the Sun keyboard and mouse. 

Yes, I know that's why it exists -- but that's irrelevant to how it
could be applied were it to ever support multi-port 8530 devices, and
how it serves as an example here beyond the com driver.


> The keyboard
> and mouse probably should have been done as line disciplines, rather than
> as a separate non-TTY device.  If it had been done that way, then it
> would have been easier to support sparc64 systems that have 16550 serial
> ports for the Sun keyboard.

No doubt!  ;-)

-- 
								Greg A. Woods

+1 416 218-0098;  <gwoods@acm.org>;  <g.a.woods@ieee.org>;  <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>