Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/thorpej_scsipi]: src/sys/dev Fixup the SC_DEBUG() stuff for the new worl...



details:   https://anonhg.NetBSD.org/src/rev/bb2061c35084
branches:  thorpej_scsipi
changeset: 477306:bb2061c35084
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Mon Nov 01 22:54:14 1999 +0000

description:
Fixup the SC_DEBUG() stuff for the new world order.

diffstat:

 sys/dev/eisa/ahb.c            |    6 +-
 sys/dev/ic/aha.c              |    9 +-
 sys/dev/ic/aic7xxx.c          |   33 +++++-------
 sys/dev/ic/bha.c              |   10 +-
 sys/dev/ic/dpt.c              |    6 +-
 sys/dev/ic/isp_netbsd.h       |    4 +-
 sys/dev/ic/ncr5380sbc.c       |    4 +-
 sys/dev/ic/uha.c              |    7 +-
 sys/dev/isa/seagate.c         |    4 +-
 sys/dev/scsipi/atapi_base.c   |   10 +-
 sys/dev/scsipi/atapiconf.c    |   13 ++--
 sys/dev/scsipi/cd.c           |   35 ++++++-------
 sys/dev/scsipi/cd_atapi.c     |    4 +-
 sys/dev/scsipi/cd_scsi.c      |    4 +-
 sys/dev/scsipi/files.scsipi   |    8 ++-
 sys/dev/scsipi/if_se.c        |   10 +-
 sys/dev/scsipi/scsi_base.c    |    4 +-
 sys/dev/scsipi/scsiconf.c     |   14 +++--
 sys/dev/scsipi/scsipi_base.c  |   94 ++++++++++++++++++++----------------
 sys/dev/scsipi/scsipi_debug.h |  107 ++++++++++++++++++++++++++++++-----------
 sys/dev/scsipi/scsipi_ioctl.c |   66 ++++++++++++++----------
 sys/dev/scsipi/scsipiconf.c   |    4 +-
 sys/dev/scsipi/scsipiconf.h   |    6 +-
 sys/dev/scsipi/sd.c           |   20 +++---
 sys/dev/scsipi/sd_atapi.c     |    8 +-
 sys/dev/scsipi/sd_scsi.c      |    6 +-
 sys/dev/scsipi/ss.c           |   16 +++---
 sys/dev/scsipi/ss_mustek.c    |   40 +++++++-------
 sys/dev/scsipi/ss_scanjet.c   |   10 +--
 sys/dev/scsipi/st.c           |   52 +++++++++----------
 sys/dev/scsipi/uk.c           |   10 +-
 31 files changed, 349 insertions(+), 275 deletions(-)

diffs (truncated from 1964 to 300 lines):

diff -r e465a989dd32 -r bb2061c35084 sys/dev/eisa/ahb.c
--- a/sys/dev/eisa/ahb.c        Fri Oct 29 22:19:30 1999 +0000
+++ b/sys/dev/eisa/ahb.c        Mon Nov 01 22:54:14 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ahb.c,v 1.28.2.3 1999/10/26 23:10:14 thorpej Exp $     */
+/*     $NetBSD: ahb.c,v 1.28.2.4 1999/11/01 22:54:14 thorpej Exp $     */
 
 #include "opt_ddb.h"
 
@@ -570,7 +570,7 @@
        struct scsipi_sense_data *s1, *s2;
        struct scsipi_xfer *xs = ecb->xs;
 
-       SC_DEBUG(xs->sc_link, SDEV_DB2, ("ahb_done\n"));
+       SC_DEBUG(xs->xs_periph, SCSIPI_DB2, ("ahb_done\n"));
 
        bus_dmamap_sync(dmat, sc->sc_dmamap_ecb,
            AHB_ECB_OFF(ecb), sizeof(struct ahb_ecb),
@@ -825,7 +825,7 @@
                periph = xs->xs_periph;
                flags = xs->xs_control;
 
-               SC_DEBUG(sc_link, SDEV_DB2, ("ahb_scsipi_request\n"));
+               SC_DEBUG(periph, SCSIPI_DB2, ("ahb_scsipi_request\n"));
 
                /* Get an ECB to use. */
                ecb = ahb_get_ecb(sc);
diff -r e465a989dd32 -r bb2061c35084 sys/dev/ic/aha.c
--- a/sys/dev/ic/aha.c  Fri Oct 29 22:19:30 1999 +0000
+++ b/sys/dev/ic/aha.c  Mon Nov 01 22:54:14 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: aha.c,v 1.24.2.4 1999/10/26 23:10:14 thorpej Exp $     */
+/*     $NetBSD: aha.c,v 1.24.2.5 1999/11/01 22:54:16 thorpej Exp $     */
 
 #include "opt_ddb.h"
 
@@ -691,7 +691,7 @@
        struct scsipi_sense_data *s1, *s2;
        struct scsipi_xfer *xs = ccb->xs;
 
-       SC_DEBUG(xs->sc_link, SDEV_DB2, ("aha_done\n"));
+       SC_DEBUG(xs->xs_periph, SCSIPI_DB2, ("aha_done\n"));
 
        /*
         * If we were a data transfer, unload the map that described
@@ -1149,7 +1149,6 @@
        struct aha_ccb *ccb;
        int error, seg, flags, s;
 
-       SC_DEBUG(sc_link, SDEV_DB2, ("aha_scsipi_request\n"));
 
        switch (req) {
        case ADAPTER_REQ_RUN_XFER:
@@ -1157,6 +1156,8 @@
                periph = xs->xs_periph;
                flags = xs->xs_control;
 
+               SC_DEBUG(periph, SCSIPI_DB2, ("aha_scsipi_request\n"));
+
                /* Get a CCB to use. */
                ccb = aha_get_ccb(sc);
 #ifdef DIAGNOSTIC
@@ -1272,7 +1273,7 @@
                aha_queue_ccb(sc, ccb);
                splx(s);
 
-               SC_DEBUG(sc_link, SDEV_DB3, ("cmd_sent\n"));
+               SC_DEBUG(periph, SCSIPI_DB3, ("cmd_sent\n"));
                if ((flags & XS_CTL_POLL) == 0)
                        return;
 
diff -r e465a989dd32 -r bb2061c35084 sys/dev/ic/aic7xxx.c
--- a/sys/dev/ic/aic7xxx.c      Fri Oct 29 22:19:30 1999 +0000
+++ b/sys/dev/ic/aic7xxx.c      Mon Nov 01 22:54:14 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: aic7xxx.c,v 1.37.2.5 1999/10/29 22:19:30 thorpej Exp $ */
+/*     $NetBSD: aic7xxx.c,v 1.37.2.6 1999/11/01 22:54:16 thorpej Exp $ */
 
 /*
  * Generic driver for the aic7xxx based adaptec SCSI controllers
@@ -156,11 +156,6 @@
 
 #define bootverbose    1
 
-#define DEBUGTARG      DEBUGTARGET
-#if DEBUGTARG < 0      /* Negative numbers for disabling cause warnings */
-#undef DEBUGTARG
-#define DEBUGTARG      17
-#endif
 #ifdef alpha           /* XXX */
 /* XXX XXX NEED REAL DMA MAPPING SUPPORT XXX XXX */ 
 extern paddr_t alpha_XXX_dmamap(vaddr_t);
@@ -778,7 +773,7 @@
                        timeout(ahc_timeout, (caddr_t)scb,
                                (scb->xs->timeout * hz) / 1000);
                }
-               SC_DEBUG(scb->xs->sc_link, SDEV_DB3, ("cmd_sent\n"));
+               SC_DEBUG(scb->xs->xs_periph, SCSIPI_DB3, ("cmd_sent\n"));
        }
        /* Now deal with SCBs that require paging */
        if((scb = ahc->waiting_scbs.stqh_first) != NULL) {
@@ -838,7 +833,7 @@
                                        timeout(ahc_timeout, (caddr_t)scb,
                                                (scb->xs->timeout * hz) / 1000);
                                }
-                               SC_DEBUG(scb->xs->sc_link, SDEV_DB3,
+                               SC_DEBUG(scb->xs->xs_periph, SCSIPI_DB3,
                                        ("cmd_paged-in\n"));
                                count++;
 
@@ -1557,7 +1552,7 @@
 
 #ifdef AHC_DEBUG
                if((ahc_debug & AHC_SHOWSCBS)
-                  && xs->xs_periph->periph_target == DEBUGTARG)
+                  && xs->xs_periph->periph_target == SCSIPI_DEBUG_TARGET)
                        ahc_print_scb(scb);
 #endif
                xs->status = scb->status;
@@ -1915,7 +1910,7 @@
 {
        struct scsipi_xfer *xs = scb->xs;
 
-       SC_DEBUG(xs->sc_link, SDEV_DB2, ("ahc_done\n"));
+       SC_DEBUG(xs->xs_periph, SCSIPI_DB2, ("ahc_done\n"));
 
 #if defined(__NetBSD__)
        /*
@@ -2389,7 +2384,7 @@
        int     error;
        int     s;
 
-       SC_DEBUG(xs->sc_link, SDEV_DB2, ("ahc_scsipi_request\n"));
+       SC_DEBUG(xs->xs_periph, SCSIPI_DB2, ("ahc_scsipi_request\n"));
 
        switch (req) {
        case ADAPTER_REQ_RUN_XFER:
@@ -2417,7 +2412,7 @@
                }
 #endif
 
-               SC_DEBUG(xs->sc_link, SDEV_DB3, ("start scb(%p)\n", scb));
+               SC_DEBUG(xs->xs_periph, SCSIPI_DB3, ("start scb(%p)\n", scb));
                scb->xs = xs;
                if (flags & XS_CTL_RESET) {
                        scb->flags |= SCB_DEVICE_RESET|SCB_IMMED;
@@ -2453,7 +2448,7 @@
                xs->resid = 0;
                xs->status = 0;
                if (xs->datalen) {
-                       SC_DEBUG(xs->sc_link, SDEV_DB4,
+                       SC_DEBUG(xs->xs_periph, SCSIPI_DB4,
                                 ("%ld @%p:- ", (long)xs->datalen, xs->data));
 
                        error = bus_dmamap_load(ahc->sc_dt, scb->dmamap_xfer,
@@ -2470,7 +2465,7 @@
 
                        default:
                                xs->error = XS_DRIVER_STUFFUP;
-                               SC_DEBUGN(xs->sc_link, SDEV_DB4, ("\n"));
+                               SC_DEBUGN(xs->xs_periph, SCSIPI_DB4, ("\n"));
                                printf("%s: error %d loading DMA map\n",
                                    ahc_name(ahc), error);
  out_bad:
@@ -2495,7 +2490,7 @@
                                    scb->dmamap_xfer->dm_segs[seg].ds_addr;
                                sg->len =
                                    scb->dmamap_xfer->dm_segs[seg].ds_len;
-                               SC_DEBUGN(xs->sc_link, SDEV_DB4, ("0x%lx",
+                               SC_DEBUGN(xs->xs_periph, SCSIPI_DB4, ("0x%lx",
                                                (u_long)sg->addr));
 #if BYTE_ORDER == BIG_ENDIAN
                                sg->addr = bswap32(sg->addr);
@@ -2503,7 +2498,7 @@
 #endif
                                sg++;
                        }
-                       SC_DEBUGN(xs->sc_link, SDEV_DB4, ("\n"));
+                       SC_DEBUGN(xs->xs_periph, SCSIPI_DB4, ("\n"));
                        scb->SG_segment_count = seg;
 
                        /* Copy the first SG into the data pointer area */
@@ -2529,7 +2524,7 @@
 
 #ifdef AHC_DEBUG
                if((ahc_debug & AHC_SHOWSCBS) &&
-                       (xs->sc_link->AIC_SCSI_TARGET == DEBUGTARG))
+                       (xs->xs_periph->AIC_SCSI_TARGET == SCSIPI_DEBUG_TARGET))
                        ahc_print_scb(scb);
 #endif
                s = splbio();
@@ -2551,7 +2546,7 @@
                                timeout(ahc_timeout, (caddr_t)scb,
                                        (xs->timeout * hz) / 1000);
                        }
-                       SC_DEBUG(xs->sc_link, SDEV_DB3, ("cmd_sent\n"));
+                       SC_DEBUG(xs->xs_periph, SCSIPI_DB3, ("cmd_sent\n"));
                }
                else {
                        scb->flags |= SCB_WAITINGQ;
@@ -2565,7 +2560,7 @@
                /*
                 * If we can't use interrupts, poll for completion
                 */
-               SC_DEBUG(xs->sc_link, SDEV_DB3, ("cmd_poll\n"));
+               SC_DEBUG(xs->xs_periph, SCSIPI_DB3, ("cmd_poll\n"));
                do {
                        if (ahc_poll(ahc, xs->timeout)) {
                                if (!(xs->xs_control & XS_CTL_SILENT))
diff -r e465a989dd32 -r bb2061c35084 sys/dev/ic/bha.c
--- a/sys/dev/ic/bha.c  Fri Oct 29 22:19:30 1999 +0000
+++ b/sys/dev/ic/bha.c  Mon Nov 01 22:54:14 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bha.c,v 1.33.2.5 1999/10/26 23:10:15 thorpej Exp $     */
+/*     $NetBSD: bha.c,v 1.33.2.6 1999/11/01 22:54:16 thorpej Exp $     */
 
 /*-
  * Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc.
@@ -297,14 +297,14 @@
        struct bha_ccb *ccb;
        int error, seg, flags, s;
 
-       SC_DEBUG(sc_link, SDEV_DB2, ("bha_scsi_cmd\n"));
-
        switch (req) {
        case ADAPTER_REQ_RUN_XFER:
                xs = arg;
                periph = xs->xs_periph;
                flags = xs->xs_control;
 
+               SC_DEBUG(periph, SCSIPI_DB2, ("bha_scsipi_request\n"));
+
                /* Get a CCB to use. */
                ccb = bha_get_ccb(sc);
 #ifdef DIAGNOSTIC
@@ -426,7 +426,7 @@
                bha_queue_ccb(sc, ccb);
                splx(s);
 
-               SC_DEBUG(sc_link, SDEV_DB3, ("cmd_sent\n"));
+               SC_DEBUG(periph, SCSIPI_DB3, ("cmd_sent\n"));
                if ((flags & XS_CTL_POLL) == 0)
                        return;
 
@@ -602,7 +602,7 @@
        bus_dma_tag_t dmat = sc->sc_dmat;
        struct scsipi_xfer *xs = ccb->xs;
 
-       SC_DEBUG(xs->sc_link, SDEV_DB2, ("bha_done\n"));
+       SC_DEBUG(xs->xs_periph, SCSIPI_DB2, ("bha_done\n"));
 
 #ifdef BHADIAG
        if (ccb->flags & CCB_SENDING) {
diff -r e465a989dd32 -r bb2061c35084 sys/dev/ic/dpt.c
--- a/sys/dev/ic/dpt.c  Fri Oct 29 22:19:30 1999 +0000
+++ b/sys/dev/ic/dpt.c  Mon Nov 01 22:54:14 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dpt.c,v 1.8.2.8 1999/10/26 23:10:16 thorpej Exp $      */
+/*     $NetBSD: dpt.c,v 1.8.2.9 1999/11/01 22:54:17 thorpej Exp $      */
 
 /*-
  * Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc.
@@ -69,7 +69,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dpt.c,v 1.8.2.8 1999/10/26 23:10:16 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dpt.c,v 1.8.2.9 1999/11/01 22:54:17 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -733,7 +733,7 @@
        dmat = sc->sc_dmat;
        xs = ccb->ccb_xs;
 
-       SC_DEBUG(xs->sc_link, SDEV_DB2, ("dpt_done_ccb\n"));
+       SC_DEBUG(xs->xs_periph, SCSIPI_DB2, ("dpt_done_ccb\n"));
 
        /*
         * If we were a data transfer, unload the map that described the 
diff -r e465a989dd32 -r bb2061c35084 sys/dev/ic/isp_netbsd.h
--- a/sys/dev/ic/isp_netbsd.h   Fri Oct 29 22:19:30 1999 +0000
+++ b/sys/dev/ic/isp_netbsd.h   Mon Nov 01 22:54:14 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isp_netbsd.h,v 1.18.2.3 1999/10/20 20:41:27 thorpej Exp $ */
+/* $NetBSD: isp_netbsd.h,v 1.18.2.4 1999/11/01 22:54:17 thorpej Exp $ */
 /* release_6_5_99 */
 /*
  * NetBSD Specific definitions for the Qlogic ISP Host Adapter
@@ -98,7 +98,7 @@
 #define        DMA_MSW(x)      (((x) >> 16) & 0xffff)
 #define        DMA_LSW(x)      (((x) & 0xffff))
 
-#if    defined(SCSIDEBUG)
+#if    defined(SCSIPI_DEBUG)
 #define        DFLT_DBLEVEL            3
 #define        CFGPRINTF               printf
 #else
diff -r e465a989dd32 -r bb2061c35084 sys/dev/ic/ncr5380sbc.c
--- a/sys/dev/ic/ncr5380sbc.c   Fri Oct 29 22:19:30 1999 +0000



Home | Main Index | Thread Index | Old Index