FIXED: the ecc algorithm in kernel/sys/dev/hp.c

utzoo!decvax!ucbvax!dist2 utzoo!decvax!ucbvax!dist2
Sun Dec 6 03:21:11 AEST 1981


	The ecc algorithm in hpecc() is not correct.  The corrections
needed are:

	diff kernel/sys/dev/hp.c.old kernel/sys/dev/hp.c
	434a435
	>     ocmd = (rp->hpcs1.w&~DRY)|IE|GO;
	450c451
	< 	while( 0<=byte && byte<bp->b_bcount && wrong!=0 )
	---
	> 	while( 0<=byte && byte<bp->b_bcount && (wrong<<=bit)!=0 )
	462d462
	< 	    wrong <<= bit;
	464c464
	< 	    putmemc(addr,getmemc(addr)^wrong);
	---
	> 	    putmemc(addr,getmemc(addr)^(int)wrong);
	469a470,471
	>     /*getmemc() changes pri.  might be a race.*/
	>     spl5();
	479d480
	<     ocmd = (rp->hpcs1.w&~DRY)|IE|GO;


The changes are necessary on tapes written before 12/5/81.

			Carl



More information about the Comp.bugs.2bsd mailing list