summaryrefslogtreecommitdiff
path: root/sys/arch/atari
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-01-07 13:18:26 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-01-07 13:18:26 +0000
commitfa74a8eb679569bcb30aff39747d402a3f9a5571 (patch)
tree97f1c29b57a10d23b8e3faceed2adf4d0fd5bf66 /sys/arch/atari
parent1c8890c1266d1212bfd536335869ddd9156c0f95 (diff)
from netbsd; Keep more debugging history (Paul Goyette). Synced with mac68k version
Diffstat (limited to 'sys/arch/atari')
-rw-r--r--sys/arch/atari/dev/ncr5380.c31
1 files changed, 18 insertions, 13 deletions
diff --git a/sys/arch/atari/dev/ncr5380.c b/sys/arch/atari/dev/ncr5380.c
index 04df451db32..a947b06dd28 100644
--- a/sys/arch/atari/dev/ncr5380.c
+++ b/sys/arch/atari/dev/ncr5380.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ncr5380.c,v 1.13 1995/12/18 20:37:51 leo Exp $ */
+/* $NetBSD: ncr5380.c,v 1.14 1996/01/06 20:17:15 leo Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman.
@@ -50,8 +50,14 @@
# define DBG_INFPRINT(a,b,c)
#endif
#ifdef DBG_PID
- static char *last_hit = NULL, *olast_hit = NULL;
-# define PID(a) olast_hit = last_hit; last_hit = a;
+ /* static char *last_hit = NULL, *olast_hit = NULL; */
+ static char *last_hit[DBG_PID];
+# define PID(a) \
+ { int i; \
+ for (i=0; i< DBG_PID-1; i++) \
+ last_hit[i] = last_hit[i+1]; \
+ last_hit[DBG_PID-1] = a; } \
+ /* olast_hit = last_hit; last_hit = a; */
#else
# define PID(a)
#endif
@@ -1484,12 +1490,12 @@ dma_ready()
*/
if (!is_edma && !(dmstat & (SC_END_DMA|SC_BSY_ERR))
&& (dmstat & SC_PHS_MTCH) ) {
- ncr_tprint(reqp, "dma_ready: spurious call"
+ ncr_tprint(reqp, "dma_ready: spurious call "
"(dm:%x,last_hit: %s)\n",
#ifdef DBG_PID
- dmstat, last_hit);
+ dmstat, last_hit[DBG_PID-1]);
#else
- dmstat, "unknown");
+ dmstat, "unknown");
#endif
return (0);
}
@@ -1973,11 +1979,7 @@ scsi_show()
SC_REQ *tmp;
int sps = splhigh();
u_char idstat, dmstat;
-
-#ifndef DBG_PID
- #define last_hit ""
- #define olast_hit ""
-#endif
+ int i;
for (tmp = issue_q; tmp; tmp = tmp->next)
show_request(tmp, "ISSUED");
@@ -1990,8 +1992,11 @@ scsi_show()
show_signals(dmstat, idstat);
if (connected)
printf("phase = %d, ", connected->phase);
- printf("busy:%x, last_hit:%s, olast_hit:%s spl:%04x\n", busy,
- last_hit, olast_hit, sps);
+ printf("busy:%x, spl:%04x\n", busy, sps);
+#ifdef DBG_PID
+ for (i=0; i<DBG_PID; i++)
+ printf("\t%d\t%s\n", i, last_hit[i]);
+#endif
splx(sps);
}