mcm@ncsu.UUCP (10/13/83)
I found a bug awhile ago in the stand-alone hp driver. This applies to systems runing 4.1 BSD with RP07 disk drives. It might apply to other systems with RP07 drives, I've never checked. Anyway, the symptom is that the drive won't respond correctly after the drive has been powered down. A message is printed about a disk format error. The format error doesn't go away until the drive is checked with a DEC diagnostic. The problem is that the RP07 keeps the volume valid bit set in the controller all the time. Dec must have thought that since the RP07 is a fixed disk, the volume must be valid all the time. The code in the hpstrategy routine checks the volume valid bit, and if it is clear, sets the FMT_22 bit, thus forcing the drive to the correct format. A simple solution is to remove the check for the volume valid bit, and do the body of the 'if' all the time. This will not cause any problem, just making disk accesses slightly slower. We've been using the code since April. I'm enclosing a diff -c listing below. Mike Mitchell duke!mcnc!ncsu!mcm THIS IS IN THE STANDALONE HP.C ONLY!!!!!!!!!!!!!!!!!!!!! *** /sys/stand/hp.c Mar 22 16:59:26 1981 --- /sys/stand/hp.org.c Apr 25 14:37:00 1983 *************** *** 77,83 struct hpst *st = &hpst[hp_type[unit]]; int cn, tn, sn; ! if ((hpaddr->hpds & HPDS_VV) == 0) { hpaddr->hpcs1 = HP_DCLR|HP_GO; hpaddr->hpcs1 = HP_PRESET|HP_GO; hpaddr->hpof = HPOF_FMT22; --- 77,89 ----- struct hpst *st = &hpst[hp_type[unit]]; int cn, tn, sn; ! /* ! * Commented out the if statment (not the body) so that it will ! * re-init the drive every time. ! * 4/25/83 Mike Mitchell ! * ! * if ((hpaddr->hpds & HPDS_VV) == 0) { ! */ hpaddr->hpcs1 = HP_DCLR|HP_GO; hpaddr->hpcs1 = HP_PRESET|HP_GO; hpaddr->hpof = HPOF_FMT22; *************** *** 81,87 hpaddr->hpcs1 = HP_DCLR|HP_GO; hpaddr->hpcs1 = HP_PRESET|HP_GO; hpaddr->hpof = HPOF_FMT22; ! } cn = bn/st->nspc; sn = bn%st->nspc; tn = sn/st->nsect; --- 87,95 ----- hpaddr->hpcs1 = HP_DCLR|HP_GO; hpaddr->hpcs1 = HP_PRESET|HP_GO; hpaddr->hpof = HPOF_FMT22; ! /* ! * } ! */ cn = bn/st->nspc; sn = bn%st->nspc; tn = sn/st->nsect;