Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/vax Add some debug stuff. Disable SCSI on KA49 for...



details:   https://anonhg.NetBSD.org/src/rev/5cce04fe7c05
branches:  trunk
changeset: 486513:5cce04fe7c05
user:      matt <matt%NetBSD.org@localhost>
date:      Tue May 23 23:47:28 2000 +0000

description:
Add some debug stuff.  Disable SCSI on KA49 for now until I can figure out
why it doesn't work.

diffstat:

 sys/arch/vax/vax/sgmap.c     |  12 +++++++-----
 sys/arch/vax/vsa/asc_vsbus.c |  33 ++++++++++++++++++++-------------
 2 files changed, 27 insertions(+), 18 deletions(-)

diffs (107 lines):

diff -r 064914a3f820 -r 5cce04fe7c05 sys/arch/vax/vax/sgmap.c
--- a/sys/arch/vax/vax/sgmap.c  Tue May 23 23:34:20 2000 +0000
+++ b/sys/arch/vax/vax/sgmap.c  Tue May 23 23:47:28 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sgmap.c,v 1.6 2000/05/17 21:22:20 matt Exp $ */
+/* $NetBSD: sgmap.c,v 1.7 2000/05/23 23:47:28 matt Exp $ */
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -250,15 +250,17 @@
                 * Load the current PTE with this page.
                 */
                if (sgmap->aps_flags & SGMAP_KA49) {
-                       unsigned long pte0 = (pa & ~VAX_PGOFSET);
-                       unsigned long tmp = pte0 >> VAX_PGSHIFT;
+                       unsigned long tmp = pa >> VAX_PGSHIFT;
                        int cnt;
 
                        for (cnt = 0; tmp != 0; tmp >>= 1) {
                                cnt += (tmp & 1);
                        }
-                       *pte = pte0 | PG_V | ((cnt & 1) ? 0 : 0x10000000);
-                       printf("%p: 0x%08lx\n", pte, *pte);
+                       *pte = pa | PG_V | ((cnt & 1) ? 0 : 0x10000000);
+#if 0
+                       printf("[%d]: va=0x%08lx map=0x%08lx\n", 
+                           pteidx + map->_dm_ptecnt, va + dmaoffset, *pte);
+#endif
                } else {
                        *pte = (pa >> VAX_PGSHIFT) | PG_V;
                }
diff -r 064914a3f820 -r 5cce04fe7c05 sys/arch/vax/vsa/asc_vsbus.c
--- a/sys/arch/vax/vsa/asc_vsbus.c      Tue May 23 23:34:20 2000 +0000
+++ b/sys/arch/vax/vsa/asc_vsbus.c      Tue May 23 23:47:28 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: asc_vsbus.c,v 1.13 2000/05/17 21:22:20 matt Exp $      */
+/*     $NetBSD: asc_vsbus.c,v 1.14 2000/05/23 23:47:29 matt Exp $      */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: asc_vsbus.c,v 1.13 2000/05/17 21:22:20 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: asc_vsbus.c,v 1.14 2000/05/23 23:47:29 matt Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -154,17 +154,17 @@
        if (asc_attached)
                return 0;
 
-       if (vax_boardtype != VAX_BTYP_46
-          && vax_boardtype != VAX_BTYP_48
-          && vax_boardtype != VAX_BTYP_49)
+       if (vax_boardtype == VAX_BTYP_46 || vax_boardtype == VAX_BTYP_48) {
+               if (cf->cf_loc[0] != 0x200c0080)
+                       return 0;
+#if 0
+       } else if (vax_boardtype == VAX_BTYP_49) {
+               if (cf->cf_loc[0] != 0x26000080)
+                       return 0;
+#endif
+       } else {
                return 0;
-
-       if (vax_boardtype == VAX_BTYP_49 && cf->cf_loc[0] != 0x26000080)
-               return 0;
-
-       if ((vax_boardtype == VAX_BTYP_46 || vax_boardtype == VAX_BTYP_48)
-           && cf->cf_loc[0] != 0x200c0080)
-               return 0;
+       }
 
        ncr_regs = (volatile u_int8_t *) va->va_addr;
 
@@ -184,7 +184,6 @@
        DELAY(10000);
 
        dummy = ncr_regs[NCR_INTR << 2] & 0xFF;
-       printf("ncr intr = %d\n", dummy);
        return (dummy & NCRINTR_SBR) != 0;
 }
 
@@ -248,6 +247,11 @@
                struct vsbus_softc *vsc = (struct vsbus_softc *) parent;
                asc->sc_adrh = (bus_space_handle_t) (vsc->sc_vsregs + ASC_REG_KA49_ADR);
                asc->sc_dirh = (bus_space_handle_t) (vsc->sc_vsregs + ASC_REG_KA49_DIR);
+#if 0
+               printf("\n%s: adrh=0x%08lx dirh=0x%08lx", self->dv_xname,
+                      asc->sc_adrh, asc->sc_dirh);
+               ncr53c9x_debug = NCR_SHOWDMA|NCR_SHOWINTS|NCR_SHOWCMDS|NCR_SHOWPHASE|NCR_SHOWSTART|NCR_SHOWMSGS;
+#endif
        }
        error = bus_dmamap_create(asc->sc_dmat, ASC_MAXXFERSIZE, 1, 
            ASC_MAXXFERSIZE, 0, BUS_DMA_NOWAIT, &asc->sc_dmamap);
@@ -448,6 +452,9 @@
                                  asc->sc_dmamap->dm_segs[0].ds_addr);
                bus_space_write_4(asc->sc_bst, asc->sc_dirh, 0,
                                  asc->sc_flags & ASC_FROMMEMORY);
+               NCR_DMA(("%s: dma-load %lu@0x%08lx\n", sc->sc_dev.dv_xname,
+                       asc->sc_dmamap->dm_segs[0].ds_len,
+                       asc->sc_dmamap->dm_segs[0].ds_addr));
                asc->sc_flags |= ASC_MAPLOADED;
        }
 



Home | Main Index | Thread Index | Old Index