Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc64/dev move zs_attach() to after the setting o...



details:   https://anonhg.NetBSD.org/src/rev/720c050ed002
branches:  trunk
changeset: 486259:720c050ed002
user:      mrg <mrg%NetBSD.org@localhost>
date:      Wed May 17 09:28:22 2000 +0000

description:
move zs_attach() to after the setting of the console device, to avoid
having cn_dev being 0 and thus cnopen() being called recursively.  this
fixes this problem for zs-based console's only.

diffstat:

 sys/arch/sparc64/dev/zs.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (43 lines):

diff -r 274caf9f06d4 -r 720c050ed002 sys/arch/sparc64/dev/zs.c
--- a/sys/arch/sparc64/dev/zs.c Wed May 17 09:25:58 2000 +0000
+++ b/sys/arch/sparc64/dev/zs.c Wed May 17 09:28:22 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: zs.c,v 1.18 2000/04/13 09:52:46 mrg Exp $      */
+/*     $NetBSD: zs.c,v 1.19 2000/05/17 09:28:22 mrg Exp $      */
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -210,7 +210,7 @@
 /* Interrupt handlers. */
 static int zshard __P((void *));
 static int zssoft __P((void *));
-static struct intrhand levelsoft = { zssoft };
+static struct intrhand levelsoft = { zssoft, 0, IPL_SOFTSERIAL };
 
 static int zs_get_speed __P((struct zs_chanstate *));
 
@@ -371,7 +371,6 @@
                        cn = &consdev_zs;
                }
        }
-       zs_attach(zsc, sa->sa_pri);
        if (cn) {
                cn_tab = cn;
                (*cn->cn_init)(cn);
@@ -379,6 +378,7 @@
                zs_kgdb_init();
 #endif
        }
+       zs_attach(zsc, sa->sa_pri);
 }
 
 static void
@@ -424,7 +424,7 @@
        volatile struct zschan *zc;
        struct zs_chanstate *cs;
        int s, zs_unit, channel;
-       static int didintr, prevpri;
+       static int didintr, prevpri;    /* XXX: multiple sbus's with mutilple zs's? */
 
        printf(" softpri %d\n", PIL_TTY);
 



Home | Main Index | Thread Index | Old Index