[comp.unix.questions] Can only get 8 lines working on Ultrix MicroVAX

kevin@kosman.UUCP (Kevin O'Gorman) (05/29/87)

I'm runnin Ultrix 1.2A on a MicroVAX II, and I have the 16-user version.
There is an Emulex controller pretending to be 16 lines of DHV, which seems
to show up when the system is booted (dh0 and dh1).  I am having lots of
trouble using the second group of 8 lines.

When the system was set up, /dev contained tty00 - tty07 plus ttyh0 - ttyh7.
It appeared that I wanted ttyh* entries, so I created 8 more with the same
major device number and minor numbers from 8 to 15.  This may have been
the mistake.

When I try to output to these new entries, such as cat >/dev/ttyh8, the
system immediately crashes, complaining that it overflowed the timeout
table.

What is the correct way to set this up?

-- 
Kevin O'Gorman
...{decvax,allegra}!philabs!hhb!kosman!kevin

chris@mimsy.UUCP (06/02/87)

In article <242@kosman.UUCP> kevin@kosman.UUCP (Kevin O'Gorman) writes:
>I'm running Ultrix 1.2A on a MicroVAX II, and I have the 16-user version.
>... /dev contained ... ttyh0 - ttyh7. ... I created 8 more with the same
>major device number and minor numbers from 8 to 15. ...  When I try
>to output to these new entries, such as cat >/dev/ttyh8, the system
>immediately crashes, complaining that it overflowed the timeout table.

Try increasing the size of the timeout table.  It is specified by
`ncallout'.  In 4.3BSD, this is by default 16+NPROC; NPROC is 20
+ 8 * MAXUSERS; MAXUSERS is the `maxusers' line in the configuration
file /sys/conf/FOOVAX.  `maxusers' has nothing to do with the
maximum number of users, and really should be called something
boring like `global_system_size_parameter'.

As a quick hack, do this:

	% su
	Password: <whatever>
	# shutdown ...
					# then wait; once down:
	# adb -w /vmunix
	ncallout?D
	_ncallout:
	_ncallout:	164		# current size is 164 entries
	ncallout?W 0t328		# so just double it
	# fastboot			# and try that.

If that fixes it, that was it.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690)
Domain:	chris@mimsy.umd.edu	Path:	seismo!mimsy!chris

avolio@decuac.UUCP (06/02/87)

In article <242@kosman.UUCP>, kevin@kosman.UUCP (Kevin O'Gorman) writes:
> I'm runnin Ultrix 1.2A on a MicroVAX II, and I have the 16-user version.
> There is an Emulex controller pretending to be 16 lines of DHV, which seems
> to show up when the system is booted (dh0 and dh1).  I am having lots of
> trouble using the second group of 8 lines.
> 
> When the system was set up, /dev contained tty00 - tty07 plus ttyh0 - ttyh7.
> It appeared that I wanted ttyh* entries, so I created 8 more with the same
> major device number and minor numbers from 8 to 15.  This may have been
> the mistake.

I believe there should not be a problem with this device assuming the
hardware settings are correct on the board.  A few months ago I helped
a customer install Ultrix-32 1.2 on a uVAX with the same controller.
Suggestions: 

	1.  Make sure that the board is set up to look like a DHV
		(!!!!) and not a DHU  (see the Emulex manual -- you
		may need to change a few switches... we did.)

	2. remove the terminal nodes in /dev -- assuming you only have
		the "dhv", "rm /dev/tty?*" should do it.

	3. remake the terminal nodes -- "cd /dev; MAKEDEV dhu0 dhu1"
		(make sure you use the MAKEDEV script!)

At this point try it again...

Fred

abs@nbc1.UUCP (06/04/87)

In article <242@kosman.UUCP>, kevin@kosman.UUCP (Kevin O'Gorman) writes:
> I'm runnin Ultrix 1.2A on a MicroVAX II, and I have the 16-user version.
> There is an Emulex controller pretending to be 16 lines of DHV, which seems
> to show up when the system is booted (dh0 and dh1).  I am having lots of
> trouble using the second group of 8 lines.
>
> What is the correct way to set this up?
> 
> -- 
> Kevin O'Gorman
> ...{decvax,allegra}!philabs!hhb!kosman!kevin



Our MicroVAX II has one DEC DHV-11 and one Emulex CS04, giving us
a total of 24 serial ports.  These were set up so that tty00
through tty07 were mapped to the DHV11, ttyh0 through ttyh7 to
ports 0 to 7 on the CP34, and ttyi0 to ttyi7 to the CP34 ports 8
through 15.  Here's how we did it...

The DIP switches on the CS04 board must be properly set.
The table belows show these settings.

CS04 DIP Switch Settings
------------------------
	1	2	3	4	5	6	7	8
SW1	open(0)	open	open	open	open	open	open	open
SW2	off(0)	off	off	off	off	off	off	off
SW3	off	off	on(1)	off	off	on	on	off
SW4	off	on	off	off	on	off	off	off

These lines in the kernel config file describe the port
arrangement.  The DHV-11 is "dhu0", and the CS04 is both "dhu1"
and "dhu2":

device		dhu0	at uba0 csr 0160440 flags 0xff
			vector dhurint dhuxint
device		dhu1	at uba0 csr 0160460 flags 0xff
			vector dhurint dhuxint
device		dhu2	at uba0 csr 0160500 flags 0xff
			vector dhurint dhuxint


The tty files are a bit more complicated.  Since our port
configuration is slightly unusual, MAKEDEV won't produce the port
mappings that we want.  We have to create the files by hand; a
pain, but the only way to do it right.  The "ls -l tty[0hi]"
command should produce output looking something like:

rw--w--w-  root     33,0 Feb 20 10:22 1987 tty00
rw--w--w-  root     33,1 Feb 20 10:22 1987 tty01
rw--w--w-  root     33,2 Feb 20 10:22 1987 tty02
rw--w--w-  root     33,3 Feb 20 10:22 1987 tty03
rw--w--w-  root     33,4 Feb 20 10:22 1987 tty04
rw--w--w-  root     33,5 Feb 20 10:22 1987 tty05
rw--w--w-  root     33,6 Feb 20 10:22 1987 tty06
rw--w--w-  root     33,7 Feb 20 10:22 1987 tty07
rw--w--w-  root     33,16 Feb 20 10:22 1987 ttyh0
rw--w--w-  root     33,17 Feb 20 10:22 1987 ttyh1
rw--w--w-  root     33,18 Feb 20 10:22 1987 ttyh2
rw--w--w-  root     33,19 Feb 20 10:22 1987 ttyh3
rw--w--w-  root     33,20 Feb 20 10:22 1987 ttyh4
rw--w--w-  root     33,21 Feb 20 10:22 1987 ttyh5
rw--w--w-  root     33,22 Feb 20 10:22 1987 ttyh6
rw--w--w-  root     33,23 Feb 20 10:22 1987 ttyh7
rw--w--w-  root     33,32 Feb 20 10:22 1987 ttyi0
rw--w--w-  root     33,33 Feb 20 10:22 1987 ttyi1
rw--w--w-  root     33,34 Feb 20 10:22 1987 ttyi2
rw--w--w-  root     33,35 Feb 20 10:22 1987 ttyi3
rw--w--w-  root     33,36 Feb 20 10:22 1987 ttyi4
rw--w--w-  root     33,37 Feb 20 10:22 1987 ttyi5
rw--w--w-  root     33,38 Feb 20 10:23 1987 ttyi6
rw--w--w-  root     33,39 Feb 20 10:23 1987 ttyi7

Note that all the major device numbers are 33.  This is because
all the ports are on (or look like they're on) DHV11's, the
major device number of which is 33.  The minor device numbers are
what distinguish the ports from one another, and they must be
created exactly as shown.  The minor numbers have a gap in 8 out
of every 16 numbers.  This is because the DHU-11 driver is being
used to support the DHV-11 devices, and the DHU-11 has 16 ports
per controller, compared with the DHV-11's 8.  Since the Emulex
CS04 is emulating two DHV-11's in this case, the gap must be
used.  To create the files, use the mknod command when logged in
as root.  To create tty00, for example, you'd type (while in
/dev) "mknod tty00 c 33 0".  To create ttyi1, you'd enter "mknod
ttyi1 c 33 33".  Easy?  Good.  Now do it 24 times, one for each
port.
-- 
Andrew Siegel, N2CN		NBC Computer Imaging, New York, NY
philabs!nbc1!abs		(212)664-5776