Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Sep 2006 00:46:55 +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:  <20060919204655.GF23360@rambler-co.ru>
In-Reply-To: <20060919203608.GE23360@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>

next in thread | previous in thread | raw e-mail | index | archive | help

--GV0iVqYguTV4Q9ER
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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. [...]
>=20
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>
:=20
: int
: main(void)
: {
:         int mode;
:=20
:         if (ioctl(0, KDGKBMODE, &mode) =3D=3D -1)
:                 err(1, "ioctl(KDGKBMODE)");
:         printf("current mode =3D %d\n", mode);
:=20
:         if (ioctl(0, KDSKBMODE, mode) =3D=3D -1)
:                 err(1, "ioctl(KDSKBMODE)");
:=20
:         if (ioctl(0, KDGKBMODE, &mode) =3D=3D -1)
:                 err(1, "ioctl(KDGKBMODE)");
:         printf("current mode =3D %d\n", mode);
:=20
:         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 =3D 1
: current mode =3D 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.


Cheers,
--=20
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer

--GV0iVqYguTV4Q9ER
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (FreeBSD)

iD8DBQFFEFc/qRfpzJluFF4RAsHSAJ95IZiKlmJWLKw0KJgfsBwz3okB2gCgiPQT
9r9yEA+IiJgKo5W6HR0qQD0=
=FQ+4
-----END PGP SIGNATURE-----

--GV0iVqYguTV4Q9ER--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060919204655.GF23360>