Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/vax Commit changes to SCSI working on the VS4000/9x...



details:   https://anonhg.NetBSD.org/src/rev/593d34e895a5
branches:  trunk
changeset: 499312:593d34e895a5
user:      matt <matt%NetBSD.org@localhost>
date:      Thu Nov 16 19:25:40 2000 +0000

description:
Commit changes to SCSI working on the VS4000/9x.  "Don't overthink the
plumbing!  Duh!".

diffstat:

 sys/arch/vax/include/sgmap.h |   3 +--
 sys/arch/vax/vax/sgmap.c     |  18 ++----------------
 sys/arch/vax/vsa/asc_vsbus.c |   6 +++---
 sys/arch/vax/vsa/vsbus_dma.c |   5 ++---
 4 files changed, 8 insertions(+), 24 deletions(-)

diffs (97 lines):

diff -r a2b5399e05e3 -r 593d34e895a5 sys/arch/vax/include/sgmap.h
--- a/sys/arch/vax/include/sgmap.h      Thu Nov 16 19:12:20 2000 +0000
+++ b/sys/arch/vax/include/sgmap.h      Thu Nov 16 19:25:40 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sgmap.h,v 1.3 2000/05/17 21:22:18 matt Exp $ */
+/* $NetBSD: sgmap.h,v 1.4 2000/11/16 19:25:40 matt Exp $ */
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -60,7 +60,6 @@
        bus_size_t aps_sgvasize;        /* size of the sgva space */
        bus_addr_t aps_pa;              /* Address in region */
        unsigned int aps_flags;         /* flags */
-#define        SGMAP_KA49              0x01    /* KA49 SGMAP is weird */
 };
 
 void   vax_sgmap_init __P((bus_dma_tag_t, struct vax_sgmap *,
diff -r a2b5399e05e3 -r 593d34e895a5 sys/arch/vax/vax/sgmap.c
--- a/sys/arch/vax/vax/sgmap.c  Thu Nov 16 19:12:20 2000 +0000
+++ b/sys/arch/vax/vax/sgmap.c  Thu Nov 16 19:25:40 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sgmap.c,v 1.8 2000/06/29 07:14:34 mrg Exp $ */
+/* $NetBSD: sgmap.c,v 1.9 2000/11/16 19:25:42 matt Exp $ */
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -249,21 +249,7 @@
                /*
                 * Load the current PTE with this page.
                 */
-               if (sgmap->aps_flags & SGMAP_KA49) {
-                       unsigned long tmp = pa >> VAX_PGSHIFT;
-                       int cnt;
-
-                       for (cnt = 0; tmp != 0; tmp >>= 1) {
-                               cnt += (tmp & 1);
-                       }
-                       *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;
-               }
+               *pte = (pa >> VAX_PGSHIFT) | PG_V;
        }
        /* The VS4000 SCSI prefetcher doesn't like to end on a page boundary
         * so add an extra page to quiet it down.
diff -r a2b5399e05e3 -r 593d34e895a5 sys/arch/vax/vsa/asc_vsbus.c
--- a/sys/arch/vax/vsa/asc_vsbus.c      Thu Nov 16 19:12:20 2000 +0000
+++ b/sys/arch/vax/vsa/asc_vsbus.c      Thu Nov 16 19:25:40 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: asc_vsbus.c,v 1.20 2000/07/26 21:50:48 matt Exp $      */
+/*     $NetBSD: asc_vsbus.c,v 1.21 2000/11/16 19:25:43 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.20 2000/07/26 21:50:48 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: asc_vsbus.c,v 1.21 2000/11/16 19:25:43 matt Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -151,7 +151,7 @@
        if (vax_boardtype == VAX_BTYP_46 || vax_boardtype == VAX_BTYP_48) {
                if (cf->cf_loc[0] != 0x200c0080)
                        return 0;
-#if 0
+#if 1
        } else if (vax_boardtype == VAX_BTYP_49) {
                if (cf->cf_loc[0] != 0x26000080)
                        return 0;
diff -r a2b5399e05e3 -r 593d34e895a5 sys/arch/vax/vsa/vsbus_dma.c
--- a/sys/arch/vax/vsa/vsbus_dma.c      Thu Nov 16 19:12:20 2000 +0000
+++ b/sys/arch/vax/vsa/vsbus_dma.c      Thu Nov 16 19:25:40 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vsbus_dma.c,v 1.7 2000/07/26 21:50:49 matt Exp $ */
+/* $NetBSD: vsbus_dma.c,v 1.8 2000/11/16 19:25:42 matt Exp $ */
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -129,10 +129,9 @@
                memset(pte, 0, mapsize);
                *(int *) (sc->sc_vsregs + 8) = segs->ds_addr;   /* set MAP BASE 0x2008008 */
        } else {
-               sc->sc_sgmap.aps_flags |= SGMAP_KA49;
                pte = (struct pte *) vax_map_physmem(KA49_SCSIMAP, mapsize / VAX_NBPG);
                for (nsegs = ptecnt; nsegs > 0; ) {
-                       ((u_int32_t *) pte)[--nsegs] = 0x88000000;
+                       ((u_int32_t *) pte)[--nsegs] = 0;
                }
                segs->ds_addr = KA49_SCSIMAP;
        }



Home | Main Index | Thread Index | Old Index