diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-07-29 14:17:33 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-07-29 14:17:33 +0000 |
commit | df64243c7389def8720641bd40115be93404b59b (patch) | |
tree | 57b9304897fe41fea3f4531b8c96316e02bf60e6 | |
parent | 0ef6b85ae5f102286920c7231d34a1c210810fdb (diff) |
Make sure we never attach a dz console to a keyboard port on VAXstations,
regardless of the L3 switch (so that machines with unsupported frame buffers
can work with serial console).
-rw-r--r-- | sys/arch/vax/vsa/dz_ibus.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/sys/arch/vax/vsa/dz_ibus.c b/sys/arch/vax/vsa/dz_ibus.c index b40f50bf2ba..3d9e8c67c9f 100644 --- a/sys/arch/vax/vsa/dz_ibus.c +++ b/sys/arch/vax/vsa/dz_ibus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dz_ibus.c,v 1.15 2006/07/19 20:22:12 miod Exp $ */ +/* $OpenBSD: dz_ibus.c,v 1.16 2006/07/29 14:17:32 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. @@ -251,19 +251,33 @@ dzcnprobe(cndev) struct consdev *cndev; { extern vaddr_t iospace; - int diagcons; + int diagcons, major; paddr_t ioaddr = 0x200A0000; + if ((major = getmajor(dzopen)) < 0) + return; + switch (vax_boardtype) { case VAX_BTYP_410: case VAX_BTYP_420: case VAX_BTYP_43: - diagcons = (vax_confdata & KA420_CFG_L3CON ? 3 : 0); + if (vax_confdata & KA420_CFG_MULTU) + diagcons = (vax_confdata & KA420_CFG_L3CON ? 3 : 0); + else + diagcons = 3; /* never on the keyboard port */ break; case VAX_BTYP_46: + if ((vax_siedata & 0xff) != VAX_VTYP_46) + diagcons = (vax_confdata & 0x100 ? 3 : 0); + else + diagcons = 3; /* never on the keyboard port */ + break; case VAX_BTYP_48: - diagcons = (vax_confdata & 0x100 ? 3 : 0); + if (((vax_siedata >> 8) & 0xff) != VAX_STYP_48) + diagcons = (vax_confdata & 0x100 ? 3 : 0); + else + diagcons = 3; /* never on the keyboard port */ break; case VAX_BTYP_49: @@ -283,7 +297,7 @@ dzcnprobe(cndev) cndev->cn_pri = CN_REMOTE; else cndev->cn_pri = CN_NORMAL; - cndev->cn_dev = makedev(getmajor(dzopen), diagcons); + cndev->cn_dev = makedev(major, diagcons); dz_regs = iospace; dz = (void *)dz_regs; ioaccess(iospace, ioaddr, 1); |