Skip site navigation (1)Skip section navigation (2)
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

--HlL+5n6rz5pIUxbD
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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. [...]
> >=20
> Can you please compile and run the following utility on sparc64,
> on any non-busy /dev/kbd*?
>=20
> : #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);
> : }
>=20
> On my i386 notebook after "kldload kbdmux" and the
> following config as a result:
>=20
> 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
>=20
> : ./a < /dev/kbd1
> : current mode =3D 1
> : current mode =3D 1
>=20
> 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.
>=20
It doesn't, on sparc64, work properly:

# uname -p
sparc64
# ./a < /dev/vkbdctl0
current mode =3D 1
current mode =3D 0


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

--HlL+5n6rz5pIUxbD
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iD8DBQFFEGAdqRfpzJluFF4RAgkYAKCBsKR1ok+jKeTxlqx6dIGdmVuc8ACfaVC4
oa8xYWDpOR+oaX5/AzdDzYI=
=oVwF
-----END PGP SIGNATURE-----

--HlL+5n6rz5pIUxbD--



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