NetBSD-Bugs archive

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

kern/59770: wd33c93: fix compile issues with DEBUG



>Number:         59770
>Category:       kern
>Synopsis:       wd33c93: fix compile issues with DEBUG
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 17 01:30:01 +0000 2025
>Originator:     adrian chadd
>Release:        11.99.3
>Organization:
>Environment:
it's sgimips, it doesn't yet boot fully!
>Description:
when compiling the sgimips ip2x kernel to debug scsi timeouts and panics, i put in a #define DEBUG in sys/dev/ic/wd33c93.c to enable just debugging from the driver.

And it didn't compile.

There's two fixes here:

* it's wd33c93_debug, not wd33c93_debug_flags
* a debug statment used a non-existent variable
>How-To-Repeat:

* put #define DEBUG in sys/dev/wd33c93.c
* build an sgimips kernel set, say GENERIC_IP2x
* wait

>Fix:
diff --git a/sys/dev/ic/wd33c93.c b/sys/dev/ic/wd33c93.c
index 64fe9b1ddec4..4f7207c509d9 100644
--- a/sys/dev/ic/wd33c93.c
+++ b/sys/dev/ic/wd33c93.c
@@ -1406,7 +1406,8 @@ wd33c93_intr(struct wd33c93_softc *sc)
        } while (sc->sc_state == SBIC_CONNECTED &&
                 asr & (SBIC_ASR_INT|SBIC_ASR_LCI));

-       SBIC_DEBUG(INTS, ("intr done. state=%d, asr=0x%02x\n", i, asr));
+       SBIC_DEBUG(INTS, ("intr done. state=%d, asr=0x%02x\n",
+           sc->sc_state, asr));

        return(1);
 }
diff --git a/sys/dev/ic/wd33c93var.h b/sys/dev/ic/wd33c93var.h
index 2e95014f0888..20076fb3df65 100644
--- a/sys/dev/ic/wd33c93var.h
+++ b/sys/dev/ic/wd33c93var.h
@@ -251,7 +251,7 @@ struct wd33c93_softc {
 #define DEBUG_SYNC     0x800

 #ifdef DEBUG
-extern int wd33c93_debug_flags;
+extern int wd33c93_debug;
 #define SBIC_DEBUG(level, str)                                         \
        do {                                                            \
                if (wd33c93_debug & __CONCAT(DEBUG_,level))             \
adrian@test-3:/data/1/adrian/netbsd/netbsd-src/sys/dev/ic % git diff
diff --git a/sys/dev/ic/wd33c93.c b/sys/dev/ic/wd33c93.c
index 64fe9b1ddec4..4f7207c509d9 100644
--- a/sys/dev/ic/wd33c93.c
+++ b/sys/dev/ic/wd33c93.c
@@ -1406,7 +1406,8 @@ wd33c93_intr(struct wd33c93_softc *sc)
        } while (sc->sc_state == SBIC_CONNECTED &&
                 asr & (SBIC_ASR_INT|SBIC_ASR_LCI));

-       SBIC_DEBUG(INTS, ("intr done. state=%d, asr=0x%02x\n", i, asr));
+       SBIC_DEBUG(INTS, ("intr done. state=%d, asr=0x%02x\n",
+           sc->sc_state, asr));

        return(1);
 }
diff --git a/sys/dev/ic/wd33c93var.h b/sys/dev/ic/wd33c93var.h
index 2e95014f0888..20076fb3df65 100644
--- a/sys/dev/ic/wd33c93var.h
+++ b/sys/dev/ic/wd33c93var.h
@@ -251,7 +251,7 @@ struct wd33c93_softc {
 #define DEBUG_SYNC     0x800

 #ifdef DEBUG
-extern int wd33c93_debug_flags;
+extern int wd33c93_debug;
 #define SBIC_DEBUG(level, str)                                         \
        do {                                                            \
                if (wd33c93_debug & __CONCAT(DEBUG_,level))             \



Home | Main Index | Thread Index | Old Index