From 0c94a5a1c1330653b5dd97cc96915fe6c4db0552 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Sun, 22 Dec 2002 16:13:31 +0000 Subject: Do not attempt to select keyboard layout until it has been determined from the keyboard (oops). This also fixes a bad interaction with wskbd_cnattach that would hose the underlying sabtty device. --- sys/arch/sparc64/dev/comkbd_ebus.c | 42 +++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'sys/arch/sparc64/dev') diff --git a/sys/arch/sparc64/dev/comkbd_ebus.c b/sys/arch/sparc64/dev/comkbd_ebus.c index f69408dd31a..4dd348f2769 100644 --- a/sys/arch/sparc64/dev/comkbd_ebus.c +++ b/sys/arch/sparc64/dev/comkbd_ebus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: comkbd_ebus.c,v 1.9 2002/12/10 01:22:34 miod Exp $ */ +/* $OpenBSD: comkbd_ebus.c,v 1.10 2002/12/22 16:13:30 miod Exp $ */ /* * Copyright (c) 2002 Jason L. Wright (jason@thought.net) @@ -234,26 +234,6 @@ comkbd_attach(parent, self, aux) return; } - if (ISTYPE5(sc->sc_layout)) { - a.keymap = &sunkbd5_keymapdata; -#ifndef SUNKBD5_LAYOUT - if (sc->sc_layout < MAXSUNLAYOUT && - sunkbd_layouts[sc->sc_layout] != -1) - sunkbd5_keymapdata.layout = - sunkbd_layouts[sc->sc_layout]; -#endif - } else { - a.keymap = &sunkbd_keymapdata; -#ifndef SUNKBD_LAYOUT - if (sc->sc_layout < MAXSUNLAYOUT && - sunkbd_layouts[sc->sc_layout] != -1) - sunkbd_keymapdata.layout = - sunkbd_layouts[sc->sc_layout]; -#endif - } - a.accessops = &comkbd_accessops; - a.accesscookie = sc; - if (console) { comkbd_init(sc); cn_tab->cn_dev = makedev(77, sc->sc_dv.dv_unit); /* XXX */ @@ -271,6 +251,26 @@ comkbd_attach(parent, self, aux) } else printf("\n"); + a.console = console; + if (ISTYPE5(sc->sc_layout)) { + a.keymap = &sunkbd5_keymapdata; +#ifndef SUNKBD5_LAYOUT + if (sc->sc_layout < MAXSUNLAYOUT && + sunkbd_layouts[sc->sc_layout] != -1) + sunkbd5_keymapdata.layout = + sunkbd_layouts[sc->sc_layout]; +#endif + } else { + a.keymap = &sunkbd_keymapdata; +#ifndef SUNKBD_LAYOUT + if (sc->sc_layout < MAXSUNLAYOUT && + sunkbd_layouts[sc->sc_layout] != -1) + sunkbd_keymapdata.layout = + sunkbd_layouts[sc->sc_layout]; +#endif + } + a.accessops = &comkbd_accessops; + a.accesscookie = sc; sc->sc_wskbddev = config_found(self, &a, wskbddevprint); } -- cgit v1.2.3