sysman@glasgow.UUCP (System Manager) (07/03/84)
Bug Report: HCRC error handling in vaxmba/hp.c (4.2bsd 6.2) -------------------------------------------------------------------------- Problem: We have two adjacent bad blocks, with the second one causing an HCRC error. When an attempt was made to read the disk, the system hung in a tight loop. I obtained the following trace with hpdebug and hpbdebug set to 1: hperr: bp 8003cf6c cyl 764 blk 67460 as 0 dc 2fc da 829 errcnt 0 mbsr=13080<ATTN,DTCMP,DTABT,MBEXC> er1=0 er2=100000<BSE> hpecc, BSE: bn 67460 cn 764 tn 8 sn 40 revector to cn 839 tn 18 sn 42 hpecc, CONT: bn 67460 cn 764 tn 8 sn 41 hperr: bp 8003cf6c cyl 764 blk 67460 as 0 dc 2fc da 82a errcnt 0 mbsr=13080<ATTN,DTCMP,DTABT,MBEXC> er1=400<HCRC> er2=100000<BSE> hperr: bp 8003cf6c cyl 764 blk 67460 as 0 dc 2fc da 829 errcnt 1 mbsr=13080<ATTN,DTCMP,DTABT,MBEXC> er1=0 er2=100000<BSE> hpecc, BSE: bn 67460 cn 764 tn 8 sn 40 revector to cn 839 tn 18 sn 42 hpecc, CONT: bn 67460 cn 764 tn 8 sn 41 and then the last 7 lines repeat ad infinitum. ------------------------------------------------------------------------- Suggested Fix: There is code in the driver to check whether an HCRC error has arisen when the sector is in the bad sector table. Unfortunately, in this loop the code is never reached. So although I don't claim to understand all that is going on here, I have moved the code to what seems to be a more suitable place. It seems to work. Don't worry if the line numbers below don't match your hp.c. We have a few local mods to allow eagles to be treated as RM80s, but the problem appears at first sight to be a general one. (We use Emulex SC750 with Eagles treated as 20-track, 44-sector RM80s.) ---------------------------------------------------------------------------- *** hp.cold Sat Jun 16 14:42:31 1984 --- hp.c Sat Jun 16 15:47:35 1984 *************** *** 605,610 } #endif if (er1 & HPER1_HCRC) { er1 &= ~(HPER1_HCE|HPER1_FER); er2 &= ~HPER2_BSE; } --- 605,617 ----- } #endif if (er1 & HPER1_HCRC) { + /* + * HCRC means the header is screwed up and the sector + * might well exist in the bad sector table, + * better check.... + */ + if (!ML11 && !sc->sc_hdr && hpecc(mi, BSE)) + return (MBD_RESTARTED); er1 &= ~(HPER1_HCE|HPER1_FER); er2 &= ~HPER2_BSE; } *************** *** 620,633 er1 & HPER1_HARD || sc->sc_hdr || (!ML11 && (er2 & HPER2_HARD))) { - /* - * HCRC means the header is screwed up and the sector - * might well exist in the bad sector table, - * better check.... - */ - if ((er1&HPER1_HCRC) && - !ML11 && !sc->sc_hdr && hpecc(mi, BSE)) - return (MBD_RESTARTED); hard: if (ML11) bp->b_blkno = MASKREG(hpaddr->hpda); --- 627,632 ----- er1 & HPER1_HARD || sc->sc_hdr || (!ML11 && (er2 & HPER2_HARD))) { hard: if (ML11) bp->b_blkno = MASKREG(hpaddr->hpda); --------------------------------------------------------------------------- Malcolm Crowe, Paisley College Zdravko Podolski, Comp Sci Dept, Univ. of Glasgow, Scotland {...!decvax!mcvax | ...!vax135 }!ukc!edcaad!edee!glasgow!paisley!mkc or: glasgow!paisley!mkc%edee%rco%ucl-cs@CSNet-Relay