[comp.bugs.4bsd] Standalone RK bootstrap fails on UBA1

chris@mimsy.UUCP (Chris Torek) (12/16/86)

Index: /sys/stand/rk.c 4.3BSD Fix

Description:
	The standalone RK06/RK07 driver cannot talk to an RK07 on
	UBA1, due to a botch in rkstrategy() in /sys/stand/rk.c:

		short dn, cn, sn, tn;
		...
		dn = io->i_unit;
		...
		rkaddr->rkcs2 = dn;

	io->i_unit is in the range [8..15], so this writes the
	`release' bit as well as the drive number, which confuses
	the controller.

Repeat-By:
	Attach an RK07 to UBA1.  Try to boot.  Watch it hang.

Fix:
	Saner (but untested) code:

		short cn, sn, tn;
		...
		rkaddr->rkcs2 = io->i_unit & 7;

-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690)
UUCP:	seismo!mimsy!chris	ARPA/CSNet:	chris@mimsy.umd.edu