[net.bugs.4bsd] Bug in 4.2 uda.c

sid@linus.UUCP (Sid Stuart) (04/16/84)

Subject: There is a bug in 4.2 bsd uda.c

Index: /sys/vaxuba/uda.c 4.2 BSD Vax

Description: There is a bug in uda.c that causes the system to hang on
booting. The system hangs in udinit() while waiting for the uda to set 
a register. The code where it hangs is,

	udaddr->udaip = 0;		/* start initialization */
	while (( udaddr->udasa & UDA_STEP1) == 0)
		;

The reason it hangs is that udaddr.udaip is set to the wrong value. In
other words the uda never gets the signal to initialize.

	The problem occurs when there is an emulex CS/11 DMF 32 emulator
on the same bus with the uda50. When the CS/11 is switched off, (it has an
isolation switch) the following statement,

	printf(" Octal, udaip: %o, udasa: %o\n", udaddr.udaip, udaddr.udasa);

returns,

	Octal, udaip: 37777772150, udasa: 37777700041

When the CS/11 is switched on we get,

	Octal, udaip: 37777760374, udasa: 37777700041

Note the change in the value of udaip. Strange that a hardware register
should change addresses.

Repeat-By: Get yourself a VAX, an emulex CS/11 DMF emulator and a uda50.
I will let you look at mine if you are in the neighborhood. Put the
uda50 at the end of the bus, the CS/11 in front of it and then try to
boot 4.2 BSD off of the uda. If it comes up, mail me your copy of uda.c

Fix: I am working on it. I don't quite understand how udaddr.udaip
gets set. If anyone would like to enlighten me, feel free. If
anyone would like to impress me with their brilliance by finding
a fix, feel free. I think the place to look for the
problem is in udprobe(), the comment:

	/* SHOULD CHECK THAT IT REALLY IS A UDA */

has got me wondering. Does anyone know how this could be done?