X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/355250d945555b0302bad154bc996d5557670f22..a0c1902ef95cce036edc1bcd0677ae38f552774f:/usr/src/sys/vax/uba/up.c diff --git a/usr/src/sys/vax/uba/up.c b/usr/src/sys/vax/uba/up.c index 0b0c822200..a63873b4f9 100644 --- a/usr/src/sys/vax/uba/up.c +++ b/usr/src/sys/vax/uba/up.c @@ -1,6 +1,10 @@ -/* up.c 3.29 %G% */ +/* up.c 4.6 %G% */ #include "../conf/up.h" +#if NUP > 0 +#if SC11 > 0 +#include "../dev/up.c.SC11" +#else /* * UNIBUS disk driver with overlapped seeks and ECC recovery. */ @@ -171,6 +175,9 @@ struct buf rupbuf; /* Buffer for raw i/o */ /* Bits of upcs2 */ #define CLR 040 /* Controller clear */ +#define MXF 01000 +#define NEM 04000 + /* Bits of uper1 */ #define DCK 0100000 /* Ecc error occurred */ #define ECH 0100 /* Ecc error was unrecoverable */ @@ -207,7 +214,7 @@ register struct buf *bp; long sz, bn; if (upwstart == 0) { - timeout((caddr_t)upwatch, 0, HZ); + timeout(upwatch, (caddr_t)0, HZ); upwstart++; } xunit = minor(bp->b_dev) & 077; @@ -507,6 +514,7 @@ upintr() if ((upaddr->upcs2 & 07) != unit) upaddr->upcs2 = unit; if ((upaddr->upds&ERR) || (upaddr->upcs1&TRE)) { + int cs2; /* * An error occurred, indeed. Select this unit * to get at the drive status (a SEARCH may have @@ -528,7 +536,9 @@ upintr() else uptab.b_active = 0; /* To force retry */ if (uptab.b_errcnt > 27) - deverror(bp, upaddr->upcs2, upaddr->uper1); + cs2 = (int)upaddr->upcs2; + deverror(bp, (int)upaddr->upcs2, + (int)upaddr->uper1); /* * If this was a correctible ECC error, let upecc * do the dirty work to correct it. If upecc @@ -550,6 +560,11 @@ upintr() while(upaddr->upds & PIP) DELAY(25); } + if (uptab.b_errcnt == 28 && cs2&(NEM|MXF)) { + printf("FLAKEY UP "); + ubareset(); + return; + } } /* * If we are still noted as active, then no @@ -610,7 +625,6 @@ upintr() if (uptab.b_actf && uptab.b_active == 0) if (upstart()) needie = 0; -out: if (needie) upaddr->upcs1 = IE; } @@ -721,6 +735,7 @@ upreset() int unit; printf(" up"); + DELAY(15000000); /* give it time to self-test */ uptab.b_active = 0; uptab.b_actf = uptab.b_actl = 0; if (up_ubinfo) { @@ -745,7 +760,7 @@ upwatch() { int i; - timeout((caddr_t)upwatch, 0, HZ); + timeout(upwatch, (caddr_t)0, HZ); if (uptab.b_active == 0) { for (i = 0; i < NUP; i++) if (uputab[i].b_active) @@ -762,3 +777,5 @@ active: printf("\n"); } } +#endif +#endif