+
+ /*
+ * If a hard error, or maximum retry count
+ * exceeded, clear controller state and
+ * pass back error to caller.
+ */
+ if (++io->i_errcnt > sc->retries || (er1 & HPER1_HARD) ||
+ (!ML11(sc->type) && (er2 & HPER2_HARD)) ||
+ (ML11(sc->type) && (io->i_errcnt >= 16))) {
+ io->i_error = EHER;
+ if (mba->mba_sr & (MBSR_WCKUP|MBSR_WCKLWR))
+ io->i_error = EWCK;
+hard:
+ io->i_errblk = bn + sc->ssect;
+ if (sc->debug & (HPF_BSEDEBUG|HPF_ECCDEBUG))
+ printf(" dc=%d, da=0x%x",MASKREG(hpaddr->hpdc),
+ MASKREG(hpaddr->hpda));
+ else {
+ printf("hp error: sn%d (cyl,trk,sec)=(%d,%d,%d) ds=%b \n",
+ bn, cn, tn, sn, MASKREG(hpaddr->hpds), HPDS_BITS);
+ printf("er1=%b er2=%b", er1, HPER1_BITS, er2, HPER2_BITS);
+ }
+ hpaddr->hpcs1 = HP_DCLR|HP_GO;
+ printf("\n");
+ rv = -1;
+ goto done;
+
+ }