Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Print register contents before we modify it.



details:   https://anonhg.NetBSD.org/src/rev/fc7b02d9e004
branches:  trunk
changeset: 471963:fc7b02d9e004
user:      pk <pk%NetBSD.org@localhost>
date:      Fri Apr 16 13:35:41 1999 +0000

description:
Print register contents before we modify it.

diffstat:

 sys/dev/ic/lsi64854.c |  16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diffs (58 lines):

diff -r fade6e91146a -r fc7b02d9e004 sys/dev/ic/lsi64854.c
--- a/sys/dev/ic/lsi64854.c     Fri Apr 16 13:34:32 1999 +0000
+++ b/sys/dev/ic/lsi64854.c     Fri Apr 16 13:35:41 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lsi64854.c,v 1.5 1999/03/23 00:32:27 pk Exp $ */
+/*     $NetBSD: lsi64854.c,v 1.6 1999/04/16 13:35:41 pk Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -342,12 +342,12 @@
                 bitmask_snprintf(csr, DDMACSR_BITS, bits, sizeof(bits))));
 
        if (csr & (D_ERR_PEND|D_SLAVE_ERR)) {
+               printf("%s: error: csr=%s\n", sc->sc_dev.dv_xname,
+                       bitmask_snprintf(csr, DDMACSR_BITS, bits,sizeof(bits)));
                csr &= ~D_EN_DMA;       /* Stop DMA */
                /* Invalidate the queue; SLAVE_ERR bit is write-to-clear */
                csr |= D_INVALIDATE|D_SLAVE_ERR;
                L64854_SCSR(sc, csr);
-               printf("%s: error: csr=%s\n", sc->sc_dev.dv_xname,
-                       bitmask_snprintf(csr, DDMACSR_BITS, bits,sizeof(bits)));
                return (-1);
        }
 
@@ -461,14 +461,15 @@
        csr = L64854_GCSR(sc);
 
        if (csr & (E_ERR_PEND|E_SLAVE_ERR)) {
+               printf("%s: error: csr=%s\n", sc->sc_dev.dv_xname,
+                       bitmask_snprintf(csr, EDMACSR_BITS, bits,sizeof(bits)));
                csr &= ~L64854_EN_DMA;  /* Stop DMA */
                /* Invalidate the queue; SLAVE_ERR bit is write-to-clear */
                csr |= E_INVALIDATE|E_SLAVE_ERR;
                L64854_SCSR(sc, csr);
-               printf("%s: error: csr=%s\n", sc->sc_dev.dv_xname,
-                       bitmask_snprintf(csr, EDMACSR_BITS, bits,sizeof(bits)));
                DMA_RESET(sc);
                dodrain = 1;
+               return (1);
        }
 
        if (dodrain) {  /* XXX - is this necessary with D_DSBL_WRINVAL on? */
@@ -569,12 +570,13 @@
                 bitmask_snprintf(csr, PDMACSR_BITS, bits, sizeof(bits))));
 
        if (csr & (P_ERR_PEND|P_SLAVE_ERR)) {
+               printf("%s: error: csr=%s\n", sc->sc_dev.dv_xname,
+                       bitmask_snprintf(csr, PDMACSR_BITS, bits,sizeof(bits)));
                csr &= ~P_EN_DMA;       /* Stop DMA */
                /* Invalidate the queue; SLAVE_ERR bit is write-to-clear */
                csr |= P_INVALIDATE|P_SLAVE_ERR;
                L64854_SCSR(sc, csr);
-               printf("%s: error: csr=%s\n", sc->sc_dev.dv_xname,
-                       bitmask_snprintf(csr, PDMACSR_BITS, bits,sizeof(bits)));
+               return (1);
        }
 
        ret = (csr & P_INT_PEND) != 0;



Home | Main Index | Thread Index | Old Index