From: miod Date: Wed, 20 Aug 2008 16:31:41 +0000 (+0000) Subject: Oops, previous console changes would initialize serial console on lines 0 X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=94cbc8f772a5817162937928151daa2a6d92b8ae;p=openbsd Oops, previous console changes would initialize serial console on lines 0 (e.g. on microVAXes) at 4800 bps as if they were keyboard lines. --- diff --git a/sys/arch/vax/dec/dzcons.c b/sys/arch/vax/dec/dzcons.c index 54778d3ac7b..f4b37997632 100644 --- a/sys/arch/vax/dec/dzcons.c +++ b/sys/arch/vax/dec/dzcons.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dzcons.c,v 1.1 2008/08/18 23:04:28 miod Exp $ */ +/* $OpenBSD: dzcons.c,v 1.2 2008/08/20 16:31:41 miod Exp $ */ /* $NetBSD: dz_ibus.c,v 1.15 1999/08/27 17:50:42 ragge Exp $ */ /* * Copyright (c) 1998 Ludd, University of Lule}, Sweden. @@ -213,17 +213,17 @@ void dzcninit(cndev) struct consdev *cndev; { - dzcninit_internal(minor(cndev->cn_dev)); + dzcninit_internal(minor(cndev->cn_dev), 0); } void -dzcninit_internal(int line) +dzcninit_internal(int line, int iskbd) { int speed; dz = (void *)dz_console_regs; - speed = line == 0 ? DZ_LPR_B4800 : DZ_LPR_B9600; + speed = iskbd ? DZ_LPR_B4800 : DZ_LPR_B9600; dz->csr = 0; /* Disable scanning until initting is done */ dz->tcr = 1 << line; /* Turn on xmitter */ diff --git a/sys/arch/vax/dec/dzkbd.c b/sys/arch/vax/dec/dzkbd.c index e5336ee04d8..e01074f60f4 100644 --- a/sys/arch/vax/dec/dzkbd.c +++ b/sys/arch/vax/dec/dzkbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dzkbd.c,v 1.13 2008/08/18 23:04:28 miod Exp $ */ +/* $OpenBSD: dzkbd.c,v 1.14 2008/08/20 16:31:41 miod Exp $ */ /* $NetBSD: dzkbd.c,v 1.1 2000/12/02 17:03:55 ragge Exp $ */ /* @@ -196,7 +196,7 @@ dzkbd_cnattach() * requires the help of the serial console routines, which * need to be initialized to work with the keyboard line. */ - dzcninit_internal(0); + dzcninit_internal(0, 1); dzkbd_console_internal.dzi_ks.attmt.sendchar = dzkbd_sendchar; dzkbd_console_internal.dzi_ks.attmt.cookie = NULL; diff --git a/sys/arch/vax/dec/dzkbdvar.h b/sys/arch/vax/dec/dzkbdvar.h index 5d12b631752..dd6cf2dc86e 100644 --- a/sys/arch/vax/dec/dzkbdvar.h +++ b/sys/arch/vax/dec/dzkbdvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dzkbdvar.h,v 1.3 2008/08/18 23:04:28 miod Exp $ */ +/* $OpenBSD: dzkbdvar.h,v 1.4 2008/08/20 16:31:41 miod Exp $ */ /* $NetBSD: dzkbdvar.h,v 1.2 2001/03/06 07:40:52 matt Exp $ */ struct dzkm_attach_args { @@ -9,7 +9,7 @@ struct dzkm_attach_args { /* dzcons.c */ int dz_can_have_kbd(void); -void dzcninit_internal(int); +void dzcninit_internal(int, int); int dzcngetc_internal(int); /* dzinput.c */