Subject: src/sys/arch/pmax/dev/sii.c #ifdef DIAGNOSTIC bug
To: None <port-pmax@netbsd.org>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: port-pmax
Date: 11/22/1994 03:05:49
You can't call sii_DumpLog if DIAGNOSTIC is not defined (i.e.,
there's no `` option DIAGNOSTIC'' in the config file), because
the definition sii_DumpLog() is bracketed by #ifdef DIAGNOSTIC/#endif.
The current source attempts to call sii_DumpLog() regardless.
The following patch fixes that.
*** ./src/sys/arc/pmax/dev/sii.c Mon Nov 21 14:40:34 1994
--- /src/NetBSD/src/sys.JONATHAN/arch/pmax/dev/sii.c Mon Sep 19 18:40:37 1994
***************
*** 742,748 ****
--- 741,749 ----
sc->sc_target = regs->destat;
state->prevComm = 0;
} else {
+ #ifdef DEBUG
sii_DumpLog();
+ #endif
panic("sc_target 2");
}
}
***************
*** 1530,1536 ****
--- 1531,1539 ----
}
if (dstat & SII_DNE) { /* XXX */
printf("sii_GetByte: DNE set 5\n");
+ #ifdef DEBUG
sii_DumpLog();
+ #endif
regs->dstat = SII_DNE;
}
data = regs->data;
***************
*** 1686,1692 ****
--- 1689,1697 ----
if (regs->dstat & SII_DNE) { /* XXX */
regs->dstat = SII_DNE;
printf("sii_StartDMA: DNE set\n");
+ #ifdef DEBUG
sii_DumpLog();
+ #endif
}
regs->dmaddrl = ((u_long)dmaAddr >> 1);
regs->dmaddrh = ((u_long)dmaAddr >> 17) & 03;