summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2020-07-28 21:33:14 +0000
committerkrw <krw@openbsd.org>2020-07-28 21:33:14 +0000
commitb31f0161b2d5ecc3f3e82ab014f50c8b3312b340 (patch)
tree67e5bddb545e226317092744e537f4a064375674 /sys
parentRewrite IPv6 source address selection in terms of the 8 rules given in (diff)
downloadwireguard-openbsd-b31f0161b2d5ecc3f3e82ab014f50c8b3312b340.tar.xz
wireguard-openbsd-b31f0161b2d5ecc3f3e82ab014f50c8b3312b340.zip
SC_DEBUG() and friends are for debugging the SCSI code, not for scattered random
uses in drivers. Use AHD_DEBUG/AHC_DEBUG sections like all the other debug output does. Don't #include scsi_debug.h.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ic/aic79xx_openbsd.c14
-rw-r--r--sys/dev/ic/aic79xx_openbsd.h3
-rw-r--r--sys/dev/ic/aic7xxx_openbsd.c14
-rw-r--r--sys/dev/ic/aic7xxx_openbsd.h3
4 files changed, 22 insertions, 12 deletions
diff --git a/sys/dev/ic/aic79xx_openbsd.c b/sys/dev/ic/aic79xx_openbsd.c
index af09cace499..84d59da4564 100644
--- a/sys/dev/ic/aic79xx_openbsd.c
+++ b/sys/dev/ic/aic79xx_openbsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aic79xx_openbsd.c,v 1.57 2020/07/20 14:41:13 krw Exp $ */
+/* $OpenBSD: aic79xx_openbsd.c,v 1.58 2020/07/28 21:33:14 krw Exp $ */
/*
* Copyright (c) 2004 Milos Urbanek, Kenneth R. Westerback & Marco Peereboom
@@ -256,7 +256,9 @@ ahd_action(struct scsi_xfer *xs)
struct ahd_tmode_tstate *tstate;
u_int16_t quirks;
- SC_DEBUG(xs->sc_link, SDEV_DB3, ("ahd_action\n"));
+#ifdef AHD_DEBUG
+ printf("%s: ahd_action\n", ahd_name(ahd));
+#endif
ahd = xs->sc_link->bus->sb_adapter_softc;
target_id = xs->sc_link->target;
@@ -284,7 +286,9 @@ ahd_action(struct scsi_xfer *xs)
scb->hscb->control = 0;
ahd->scb_data.scbindex[SCB_GET_TAG(scb)] = NULL;
- SC_DEBUG(xs->sc_link, SDEV_DB3, ("start scb(%p)\n", scb));
+#ifdef AHD_DEBUG
+ printf("%s: start scb(%p)\n", ahd_name(ahd), scb);
+#endif
scb->xs = xs;
timeout_set(&xs->stimeout, ahd_timeout, scb);
@@ -431,7 +435,9 @@ ahd_execute_scb(void *arg, bus_dma_segment_t *dm_segs, int nsegments)
/*
* If we can't use interrupts, poll for completion
*/
- SC_DEBUG(xs->sc_link, SDEV_DB3, ("cmd_poll\n"));
+#ifdef AHD_DEBUG
+ printf("%s: cmd_poll\n", ahd_name(ahd));
+#endif
do {
if (ahd_poll(ahd, xs->timeout)) {
diff --git a/sys/dev/ic/aic79xx_openbsd.h b/sys/dev/ic/aic79xx_openbsd.h
index f7e0624899f..b3b70353925 100644
--- a/sys/dev/ic/aic79xx_openbsd.h
+++ b/sys/dev/ic/aic79xx_openbsd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: aic79xx_openbsd.h,v 1.20 2017/12/12 12:33:36 krw Exp $ */
+/* $OpenBSD: aic79xx_openbsd.h,v 1.21 2020/07/28 21:33:14 krw Exp $ */
/*
* Copyright (c) 2004 Milos Urbanek, Kenneth R. Westerback & Marco Peereboom
@@ -85,7 +85,6 @@
#include <scsi/scsi_all.h>
#include <scsi/scsi_message.h>
-#include <scsi/scsi_debug.h>
#include <scsi/scsiconf.h>
#include <uvm/uvm_extern.h>
diff --git a/sys/dev/ic/aic7xxx_openbsd.c b/sys/dev/ic/aic7xxx_openbsd.c
index e7fec789d82..1f6a0de81da 100644
--- a/sys/dev/ic/aic7xxx_openbsd.c
+++ b/sys/dev/ic/aic7xxx_openbsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aic7xxx_openbsd.c,v 1.68 2020/07/20 16:09:48 krw Exp $ */
+/* $OpenBSD: aic7xxx_openbsd.c,v 1.69 2020/07/28 21:33:14 krw Exp $ */
/* $NetBSD: aic7xxx_osm.c,v 1.14 2003/11/02 11:07:44 wiz Exp $ */
/*
@@ -251,7 +251,9 @@ ahc_action(struct scsi_xfer *xs)
u_int target_id;
u_int our_id;
- SC_DEBUG(xs->sc_link, SDEV_DB3, ("ahc_action\n"));
+#ifdef AHC_DEBUG
+ printf("%s: ahc_action\n", ahc_name(ahc));
+#endif
ahc = xs->sc_link->bus->sb_adapter_softc;
target_id = xs->sc_link->target;
@@ -269,7 +271,9 @@ ahc_action(struct scsi_xfer *xs)
hscb->control = 0;
ahc->scb_data->scbindex[hscb->tag] = NULL;
- SC_DEBUG(xs->sc_link, SDEV_DB3, ("start scb(%p)\n", scb));
+#ifdef AHC_DEBUG
+ printf("%s: start scb(%p)\n", ahc_name(ahc), scb);
+#endif
scb->xs = xs;
timeout_set(&xs->stimeout, ahc_timeout, scb);
@@ -457,7 +461,9 @@ ahc_execute_scb(void *arg, bus_dma_segment_t *dm_segs, int nsegments)
* If we can't use interrupts, poll for completion
*/
poll:
- SC_DEBUG(xs->sc_link, SDEV_DB3, ("cmd_poll\n"));
+#ifdef AHC_DEBUG
+ printf("%s: cmd_poll\n"", ahc_name(ahc));
+#endif
do {
if (ahc_poll(ahc, xs->timeout)) {
diff --git a/sys/dev/ic/aic7xxx_openbsd.h b/sys/dev/ic/aic7xxx_openbsd.h
index 48036ebff8f..a26a9fd0951 100644
--- a/sys/dev/ic/aic7xxx_openbsd.h
+++ b/sys/dev/ic/aic7xxx_openbsd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: aic7xxx_openbsd.h,v 1.29 2020/07/05 21:54:44 krw Exp $ */
+/* $OpenBSD: aic7xxx_openbsd.h,v 1.30 2020/07/28 21:33:14 krw Exp $ */
/* $NetBSD: aic7xxx_osm.h,v 1.7 2003/11/02 11:07:44 wiz Exp $ */
/*
@@ -62,7 +62,6 @@
#include <scsi/scsi_all.h>
#include <scsi/scsi_message.h>
-#include <scsi/scsi_debug.h>
#include <scsi/scsiconf.h>
#include <uvm/uvm_extern.h>