summaryrefslogtreecommitdiff
path: root/sys/dev/isa
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2020-07-29 12:13:06 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2020-07-29 12:13:06 +0000
commit4d03bfe896ec57a6f8197e203a3115044b7d9389 (patch)
tree5f4e604f430faef031c528531df9de048fd67817 /sys/dev/isa
parent762fa955c47cdcf4e26a0501f01cfbb5c3202eb3 (diff)
SC_DEBUG() and friends are for debugging the SCSI code, not for scattered random
uses in drivers. Use WDSDEBUG sections like the rest of the debug output. Fix some printf() format problems that were missed in the previous sweep.
Diffstat (limited to 'sys/dev/isa')
-rw-r--r--sys/dev/isa/wds.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/sys/dev/isa/wds.c b/sys/dev/isa/wds.c
index 2419ed0bbb9..d90f63fb18e 100644
--- a/sys/dev/isa/wds.c
+++ b/sys/dev/isa/wds.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wds.c,v 1.55 2020/07/22 13:16:04 krw Exp $ */
+/* $OpenBSD: wds.c,v 1.56 2020/07/29 12:13:05 krw Exp $ */
/* $NetBSD: wds.c,v 1.13 1996/11/03 16:20:31 mycroft Exp $ */
#undef WDSDIAG
@@ -337,9 +337,9 @@ AGAIN:
u_int8_t *cp = (u_int8_t *)&scb->cmd.scb;
printf("op=%x %x %x %x %x %x\n",
cp[0], cp[1], cp[2], cp[3], cp[4], cp[5]);
- printf("stat %x for mbi addr = 0x%08x, ",
+ printf("stat %x for mbi addr = %p, ",
wmbi->stat, wmbi);
- printf("scb addr = 0x%x\n", scb);
+ printf("scb addr = %p\n", scb);
}
#endif /* WDSDEBUG */
@@ -910,8 +910,9 @@ wds_scsi_cmd(struct scsi_xfer *xs)
/*
* Set up the scatter-gather block.
*/
- SC_DEBUG(sc_link, SDEV_DB4,
- ("%d @0x%x:- ", xs->datalen, xs->data));
+#ifdef WDSDEBUG
+ printf("%s: %d @%p:- ", sc->sc_dev.dv_xname, xs->datalen, xs->data);
+#endif
datalen = xs->datalen;
thiskv = (int)xs->data;
@@ -923,7 +924,9 @@ wds_scsi_cmd(struct scsi_xfer *xs)
/* put in the base address */
ltophys(thisphys, sg->seg_addr);
- SC_DEBUGN(sc_link, SDEV_DB4, ("0x%x", thisphys));
+#ifdef WDSDEBUG
+ printf("0x%lx", thisphys);
+#endif
/* do it at least once */
nextphys = thisphys;
@@ -957,14 +960,17 @@ wds_scsi_cmd(struct scsi_xfer *xs)
/*
* next page isn't contiguous, finish the seg
*/
- SC_DEBUGN(sc_link, SDEV_DB4,
- ("(0x%x)", bytes_this_seg));
+#ifdef WDSDEBUG
+ printf("(0x%x)", bytes_this_seg);
+#endif
ltophys(bytes_this_seg, sg->seg_len);
sg++;
seg++;
}
- SC_DEBUGN(sc_link, SDEV_DB4, ("\n"));
+#ifdef WDSDEBUG
+ printf("\n");
+#endif
if (datalen) {
/*
* there's still data, must have run out of segs!