Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/dec Add cnmagic support to the DZ driver. Pmax shoul...
details: https://anonhg.NetBSD.org/src/rev/4e67fa6a52c5
branches: trunk
changeset: 553539:4e67fa6a52c5
user: ragge <ragge%NetBSD.org@localhost>
date: Sat Oct 18 12:10:53 2003 +0000
description:
Add cnmagic support to the DZ driver. Pmax should also use cnmagic instead
of it's homwgrown tests.
diffstat:
sys/dev/dec/dz.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diffs (56 lines):
diff -r 2c21cb3df867 -r 4e67fa6a52c5 sys/dev/dec/dz.c
--- a/sys/dev/dec/dz.c Sat Oct 18 12:09:18 2003 +0000
+++ b/sys/dev/dec/dz.c Sat Oct 18 12:10:53 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dz.c,v 1.10 2003/08/07 16:30:54 agc Exp $ */
+/* $NetBSD: dz.c,v 1.11 2003/10/18 12:10:53 ragge Exp $ */
/*
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dz.c,v 1.10 2003/08/07 16:30:54 agc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dz.c,v 1.11 2003/10/18 12:10:53 ragge Exp $");
#include "opt_ddb.h"
@@ -90,6 +90,8 @@
#include <dev/dec/dzreg.h>
#include <dev/dec/dzvar.h>
+#include <dev/cons.h>
+
#define DZ_READ_BYTE(adr) \
bus_space_read_1(sc->sc_iot, sc->sc_ioh, sc->sc_dr.adr)
#define DZ_READ_WORD(adr) \
@@ -155,6 +157,7 @@
*/
int dz_timer; /* true if timer started */
struct callout dzscan_ch;
+static struct cnm_state dz_cnm_state;
void
dzattach(struct dz_softc *sc, struct evcnt *parent_evcnt, int consline)
@@ -182,6 +185,11 @@
evcnt_attach_dynamic(&sc->sc_tintrcnt, EVCNT_TYPE_INTR, parent_evcnt,
sc->sc_dev.dv_xname, "tintr");
+ /* Console magic keys */
+ cn_init_magic(&dz_cnm_state);
+ cn_set_magic("\047\001"); /* default magic is BREAK */
+ /* VAX will change it in MD code */
+
/* Alas no interrupt on modem bit changes, so we manually scan */
if (dz_timer == 0) {
@@ -215,6 +223,8 @@
(*sc->sc_dz[line].dz_catch)(sc->sc_dz[line].dz_private, cc))
continue;
+ cn_check_magic(tp->t_dev, cc, dz_cnm_state);
+
if (!(tp->t_state & TS_ISOPEN)) {
wakeup((caddr_t)&tp->t_rawq);
continue;
Home |
Main Index |
Thread Index |
Old Index