Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/dec The interrupt handler uses the softc, so it's pr...
details: https://anonhg.NetBSD.org/src/rev/8762bff1ca5c
branches: trunk
changeset: 754715:8762bff1ca5c
user: hans <hans%NetBSD.org@localhost>
date: Sun May 09 22:29:26 2010 +0000
description:
The interrupt handler uses the softc, so it's probably a good idea to
initialize it before causing interrupts. Prevents a panic on VAXstation
4000/9x with SPX console.
diffstat:
sys/dev/dec/dz.c | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diffs (52 lines):
diff -r 4e9ecb0a8e44 -r 8762bff1ca5c sys/dev/dec/dz.c
--- a/sys/dev/dec/dz.c Sun May 09 22:24:44 2010 +0000
+++ b/sys/dev/dec/dz.c Sun May 09 22:29:26 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dz.c,v 1.38 2008/09/08 23:36:54 gmcgarry Exp $ */
+/* $NetBSD: dz.c,v 1.39 2010/05/09 22:29:26 hans 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.38 2008/09/08 23:36:54 gmcgarry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dz.c,v 1.39 2010/05/09 22:29:26 hans Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -204,16 +204,7 @@
{
int n;
- sc->sc_rxint = sc->sc_brk = 0;
- sc->sc_consline = consline;
-
- sc->sc_dr.dr_tcrw = sc->sc_dr.dr_tcr;
- dz_write2(sc, sc->sc_dr.dr_csr, DZ_CSR_MSE | DZ_CSR_RXIE | DZ_CSR_TXIE);
- dz_write1(sc, sc->sc_dr.dr_dtr, 0);
- dz_write1(sc, sc->sc_dr.dr_break, 0);
- DELAY(10000);
-
- /* Initialize our softc structure. Should be done in open? */
+ /* Initialize our softc structure. */
for (n = 0; n < sc->sc_type; n++) {
sc->sc_dz[n].dz_sc = sc;
@@ -231,6 +222,15 @@
cn_set_magic("\047\001"); /* default magic is BREAK */
/* VAX will change it in MD code */
+ sc->sc_rxint = sc->sc_brk = 0;
+ sc->sc_consline = consline;
+
+ sc->sc_dr.dr_tcrw = sc->sc_dr.dr_tcr;
+ dz_write2(sc, sc->sc_dr.dr_csr, DZ_CSR_MSE | DZ_CSR_RXIE | DZ_CSR_TXIE);
+ dz_write1(sc, sc->sc_dr.dr_dtr, 0);
+ dz_write1(sc, sc->sc_dr.dr_break, 0);
+ DELAY(10000);
+
/* Alas no interrupt on modem bit changes, so we manually scan */
if (dz_timer == 0) {
dz_timer = 1;
Home |
Main Index |
Thread Index |
Old Index