Date: Wed, 20 Sep 2006 01:24:45 +0400 From: Ruslan Ermilov <ru@FreeBSD.org> To: Maksim Yevmenkin <maksim.yevmenkin@gmail.com> Cc: cvs-src@FreeBSD.org, Marius Strobl <marius@FreeBSD.org>, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/kbdmux kbdmux.c Message-ID: <20060919212445.GA44298@rambler-co.ru> In-Reply-To: <20060919204655.GF23360@rambler-co.ru> References: <200609191303.k8JD3AHl050783@repoman.freebsd.org> <bb4a86c70609190944o2438a4a4vae7b3bb2332522ee@mail.gmail.com> <20060919190645.GA23068@rambler-co.ru> <bb4a86c70609191236j13fe1563w123cb046261ee129@mail.gmail.com> <20060919194819.GA23360@rambler-co.ru> <bb4a86c70609191300t3bea8380qa1898d1a89b6fc27@mail.gmail.com> <20060919203608.GE23360@rambler-co.ru> <20060919204655.GF23360@rambler-co.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Wed, Sep 20, 2006 at 12:46:55AM +0400, Ruslan Ermilov wrote:
> On Wed, Sep 20, 2006 at 12:36:08AM +0400, Ruslan Ermilov wrote:
> > KDSETLED isn't used outside the kernel, so I assume you tested it
> > only when it's called from within the kernel? If so, try passing
> > it from useland to see the endianness problem; I'm pretty sure it
> > will fire. [...]
> >
> Can you please compile and run the following utility on sparc64,
> on any non-busy /dev/kbd*?
>
> : #include <sys/kbio.h>
> : #include <sys/ioctl.h>
> : #include <err.h>
> : #include <stdio.h>
> : #include <stdlib.h>
> :
> : int
> : main(void)
> : {
> : int mode;
> :
> : if (ioctl(0, KDGKBMODE, &mode) == -1)
> : err(1, "ioctl(KDGKBMODE)");
> : printf("current mode = %d\n", mode);
> :
> : if (ioctl(0, KDSKBMODE, mode) == -1)
> : err(1, "ioctl(KDSKBMODE)");
> :
> : if (ioctl(0, KDGKBMODE, &mode) == -1)
> : err(1, "ioctl(KDGKBMODE)");
> : printf("current mode = %d\n", mode);
> :
> : exit (0);
> : }
>
> On my i386 notebook after "kldload kbdmux" and the
> following config as a result:
>
> lrwxr-xr-x 1 root wheel 6 Jan 1 1970 /dev/kbd0 -> atkbd0
> lrwxr-xr-x 1 root wheel 7 Sep 20 00:43 /dev/kbd1 -> kbdmux0
>
> : ./a < /dev/kbd1
> : current mode = 1
> : current mode = 1
>
> If it works properly on sparc64, it should be identical.
> If you'll see a different value in the second "current
> mode", it'll indicate an endianness bug we're talking
> about.
>
It doesn't, on sparc64, work properly:
# uname -p
sparc64
# ./a < /dev/vkbdctl0
current mode = 1
current mode = 0
Cheers,
--
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (FreeBSD)
iD8DBQFFEGAdqRfpzJluFF4RAgkYAKCBsKR1ok+jKeTxlqx6dIGdmVuc8ACfaVC4
oa8xYWDpOR+oaX5/AzdDzYI=
=oVwF
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060919212445.GA44298>
