Date: Wed, 20 Sep 2006 20:21:05 +0400 From: Ruslan Ermilov <ru@FreeBSD.org> To: Marius Strobl <marius@alchemy.franken.de> Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org, Maksim Yevmenkin <maksim.yevmenkin@gmail.com> Subject: Re: cvs commit: src/sys/dev/kbdmux kbdmux.c Message-ID: <20060920162105.GC9976@rambler-co.ru> In-Reply-To: <20060920122830.GB982@rambler-co.ru> References: <bb4a86c70609191236j13fe1563w123cb046261ee129@mail.gmail.com> <20060919194819.GA23360@rambler-co.ru> <bb4a86c70609191300t3bea8380qa1898d1a89b6fc27@mail.gmail.com> <20060919203608.GE23360@rambler-co.ru> <bb4a86c70609191415m59a9ef89x91f25e6912339390@mail.gmail.com> <20060919215605.GB44298@rambler-co.ru> <20060919221404.GT94944@alchemy.franken.de> <20060920055715.GA81843@rambler-co.ru> <20060920121017.GU94944@alchemy.franken.de> <20060920122830.GB982@rambler-co.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Here's another demo that indicates that sparc64 doesn't work
properly. In this case it's a CONS_SETKBD ioctl which is used
by kbdcontrol(8). I "kldload vkbd" and make sure two vkbd
instances exist, /dev/vkbdctl0 and /dev/vkbdctl1.
Now, I open the first like this:
sleep 1200 < /dev/vkbdctl0
and attempt to program /dev/vkbdctl1 as a keyboard for
virtual terminals. On amd64, I get:
# kbdcontrol -K < /dev/ttyv0 > /dev/null ; kbdcontrol -k /dev/vkbdctl1 -i < /dev/ttyv0
kbd2 at vkbd1
kbd2
vkbd1, type:generic (0)
kbd2:
vkbd1, type:generic (0)
It's fine; the "-i" returns the same console as as was programmed.
On sparc64, I get:
# kbdcontrol -K < /dev/ttyv0 > /dev/null ; kbdcontrol -k /dev/vkbdctl1 -i < /dev/ttyv0
kbd1
vkbd1, type:generic (0)
kbd0:
vkbd0, type:generic (0)
Surprise! It assigned already open (by sleep(1)) vkbd0 while I
asked for vkbd1.
Oh yes, if you ever want to repeat this, make sure to temporary
apply this patch to kbdcontrol.c, because vkbd is only valid
when it's open:
%%%
Index: kbdcontrol.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/kbdcontrol/kbdcontrol.c,v
retrieving revision 1.50
diff -u -p -r1.50 kbdcontrol.c
--- kbdcontrol.c 15 Sep 2006 18:41:12 -0000 1.50
+++ kbdcontrol.c 20 Sep 2006 16:18:48 -0000
@@ -1046,7 +1046,9 @@ set_keyboard(char *device)
* is closed. So, we don't check error here.
*/
ioctl(fd, CONS_RELKBD, 0);
+#if 0
close(fd);
+#endif
#if 1
printf("kbd%d\n", info.kb_index);
printf(" %.*s%d, type:%s (%d)\n",
%%%
What this means practically is that currently, on sparc64, you
can only have a /dev/kbd0 keyboard attached to a syscons console.
A fix is in the works...
Cheers,
--
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (FreeBSD)
iD8DBQFFEWpxqRfpzJluFF4RAmiVAJ0dTiCWY5eZvHSG7ehJfH+7q+HekwCfRlxi
szEfOOHyRPu93xVMB029PX0=
=ADQb
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060920162105.GC9976>
