no more delays at resets; print unit numbers at resets
SCCS-vsn: sys/vax/uba/uba.c 4.19
#define DELAY(N) { register int d; d = N; while (--d > 0); }
#define DELAY(N) { register int d; d = N; while (--d > 0); }
#include "../h/nexus.h"
#include "../h/dk.h"
#include "../h/nexus.h"
#include "../h/dk.h"
+#if VAX780
+char ubasr_bits[] = UBASR_BITS;
+#endif
+
/*
* Do transfer on device argument. The controller
* and uba involved are implied by the device.
/*
* Do transfer on device argument. The controller
* and uba involved are implied by the device.
switch (cpu) {
#if VAX780
case VAX_780:
switch (cpu) {
#if VAX780
case VAX_780:
- printf("UBA RESET %d:", uban);
+ printf("uba%d: reset", uban);
ubainit(uh->uh_uba);
break;
#endif
#if VAX750
case VAX_750:
ubainit(uh->uh_uba);
break;
#endif
#if VAX750
case VAX_750:
- printf("UNIBUS INIT:");
+ /* give devices time to recover from power fail */
+ DELAY(5000000);
uh->uh_hangcnt++;
if (uh->uh_hangcnt > 5*hz) {
uh->uh_hangcnt = 0;
uh->uh_hangcnt++;
if (uh->uh_hangcnt > 5*hz) {
uh->uh_hangcnt = 0;
+ printf("uba%d: hung\n", uban);
if (uvec == 0) {
uh->uh_zvcnt++;
if (uh->uh_zvcnt > 250000) {
if (uvec == 0) {
uh->uh_zvcnt++;
if (uh->uh_zvcnt > 250000) {
- printf("ZERO VECTOR ");
+ printf("uba%d: too many zero vectors\n");
ubareset(uban);
}
uvec = 0;
return;
}
if (uba->uba_cnfgr & NEX_CFGFLT) {
ubareset(uban);
}
uvec = 0;
return;
}
if (uba->uba_cnfgr & NEX_CFGFLT) {
- printf("UBA%d SBI FAULT sr %x cnfgr %x\n",
- uban, uba->uba_sr, uba->uba_cnfgr);
+ printf("uba%d: sbi fault sr=%b cnfgr=%b\n",
+ uban, uba->uba_sr, ubasr_bits,
+ uba->uba_cnfgr, nexflt_bits);
ubareset(uban);
uvec = 0;
return;
}
sr = uba->uba_sr;
s = spl7();
ubareset(uban);
uvec = 0;
return;
}
sr = uba->uba_sr;
s = spl7();
- printf("UBA%d ERROR SR %x FMER %x FUBAR %o\n",
+ printf("uba%d: uba error sr=%x fmer=%x fubar=%o\n",
uban, uba->uba_sr, uba->uba_fmer, 4*uba->uba_fubar);
splx(s);
uba->uba_sr = sr;
uban, uba->uba_sr, uba->uba_fmer, 4*uba->uba_fubar);
splx(s);
uba->uba_sr = sr;