summaryrefslogtreecommitdiff
path: root/sys/arch/vax
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-07-29 15:11:58 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-07-29 15:11:58 +0000
commitc306d80b55610dbf438d85bdb93cb3e8cf120e8c (patch)
treebfa712a35c4c73cb3b018374721f3ab96948af7f /sys/arch/vax
parent20ec1696e0640c3e063f6ce869fe0cfa0c5c4587 (diff)
At attach() time, do not simply trust the L3 switch to know if we are the
console, check for cn_tab pointing to wsdisplay as well.
Diffstat (limited to 'sys/arch/vax')
-rw-r--r--sys/arch/vax/vsa/gpx.c8
-rw-r--r--sys/arch/vax/vsa/lcg.c7
-rw-r--r--sys/arch/vax/vsa/lcspx.c7
-rw-r--r--sys/arch/vax/vsa/smg.c8
4 files changed, 22 insertions, 8 deletions
diff --git a/sys/arch/vax/vsa/gpx.c b/sys/arch/vax/vsa/gpx.c
index 4b4aaca699c..2afdbc171b8 100644
--- a/sys/arch/vax/vsa/gpx.c
+++ b/sys/arch/vax/vsa/gpx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gpx.c,v 1.2 2006/07/29 14:18:57 miod Exp $ */
+/* $OpenBSD: gpx.c,v 1.3 2006/07/29 15:11:57 miod Exp $ */
/*
* Copyright (c) 2006 Miodrag Vallat.
*
@@ -96,6 +96,8 @@
#include <uvm/uvm_extern.h>
+#include <dev/cons.h>
+
#include <dev/wscons/wsconsio.h>
#include <dev/wscons/wsdisplayvar.h>
#include <dev/rasops/rasops.h>
@@ -273,8 +275,10 @@ gpx_attach(struct device *parent, struct device *self, void *aux)
struct wsemuldisplaydev_attach_args aa;
int console;
vaddr_t tmp;
+ extern struct consdev wsdisplay_cons;
- console = (vax_confdata & (KA420_CFG_L3CON | KA420_CFG_MULTU)) == 0;
+ console = (vax_confdata & (KA420_CFG_L3CON | KA420_CFG_MULTU)) == 0 &&
+ cn_tab == &wsdisplay_cons;
if (console) {
scr = &gpx_consscr;
sc->sc_nscreens = 1;
diff --git a/sys/arch/vax/vsa/lcg.c b/sys/arch/vax/vsa/lcg.c
index 27e882b0ee5..68291e29c6c 100644
--- a/sys/arch/vax/vsa/lcg.c
+++ b/sys/arch/vax/vsa/lcg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lcg.c,v 1.3 2006/07/29 14:18:57 miod Exp $ */
+/* $OpenBSD: lcg.c,v 1.4 2006/07/29 15:11:57 miod Exp $ */
/*
* Copyright (c) 2006 Miodrag Vallat.
*
@@ -58,6 +58,8 @@
#include <uvm/uvm_extern.h>
+#include <dev/cons.h>
+
#include <dev/wscons/wsconsio.h>
#include <dev/wscons/wsdisplayvar.h>
#include <dev/rasops/rasops.h>
@@ -202,8 +204,9 @@ lcg_attach(struct device *parent, struct device *self, void *aux)
struct wsemuldisplaydev_attach_args aa;
vaddr_t tmp;
int console;
+ extern struct consdev wsdisplay_cons;
- console = (vax_confdata & 0x100) == 0;
+ console = (vax_confdata & 0x100) == 0 && cn_tab == &wsdisplay_cons;
if (console) {
ss = &lcg_consscr;
sc->sc_nscreens = 1;
diff --git a/sys/arch/vax/vsa/lcspx.c b/sys/arch/vax/vsa/lcspx.c
index 2cf336da39f..0ae77621926 100644
--- a/sys/arch/vax/vsa/lcspx.c
+++ b/sys/arch/vax/vsa/lcspx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lcspx.c,v 1.2 2006/07/29 14:18:57 miod Exp $ */
+/* $OpenBSD: lcspx.c,v 1.3 2006/07/29 15:11:57 miod Exp $ */
/*
* Copyright (c) 2006 Miodrag Vallat.
*
@@ -60,6 +60,8 @@
#include <uvm/uvm_extern.h>
+#include <dev/cons.h>
+
#include <dev/wscons/wsconsio.h>
#include <dev/wscons/wsdisplayvar.h>
#include <dev/rasops/rasops.h>
@@ -183,8 +185,9 @@ lcspx_attach(struct device *parent, struct device *self, void *aux)
struct lcspx_screen *ss;
struct wsemuldisplaydev_attach_args aa;
int i, console;
+ extern struct consdev wsdisplay_cons;
- console = (vax_confdata & 8) == 0;
+ console = (vax_confdata & 8) == 0 && cn_tab == &wsdisplay_cons;
if (console) {
ss = &lcspx_consscr;
sc->sc_nscreens = 1;
diff --git a/sys/arch/vax/vsa/smg.c b/sys/arch/vax/vsa/smg.c
index bc3007365b0..418f69cc371 100644
--- a/sys/arch/vax/vsa/smg.c
+++ b/sys/arch/vax/vsa/smg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smg.c,v 1.12 2006/07/29 14:18:57 miod Exp $ */
+/* $OpenBSD: smg.c,v 1.13 2006/07/29 15:11:57 miod Exp $ */
/* $NetBSD: smg.c,v 1.21 2000/03/23 06:46:44 thorpej Exp $ */
/*
* Copyright (c) 2006, Miodrag Vallat
@@ -69,6 +69,8 @@
#include <uvm/uvm_extern.h>
+#include <dev/cons.h>
+
#include <dev/ic/dc503reg.h>
#include <vax/qbus/dzreg.h>
@@ -218,8 +220,10 @@ smg_attach(struct device *parent, struct device *self, void *aux)
struct smg_screen *scr;
struct wsemuldisplaydev_attach_args aa;
int console;
+ extern struct consdev wsdisplay_cons;
- console = (vax_confdata & KA420_CFG_L3CON) == 0;
+ console = (vax_confdata & KA420_CFG_L3CON) == 0 &&
+ cn_tab == &wsdisplay_cons;
if (console) {
scr = &smg_consscr;
sc->sc_nscreens = 1;