Date: Wed, 20 Sep 2006 12:04:49 -0700 From: "Maksim Yevmenkin" <maksim.yevmenkin@gmail.com> To: "Ruslan Ermilov" <ru@freebsd.org> Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org, Marius Strobl <marius@alchemy.franken.de> Subject: Re: cvs commit: src/sys/dev/kbdmux kbdmux.c Message-ID: <bb4a86c70609201204n499a5bc2mb8023c502937a275@mail.gmail.com> In-Reply-To: <20060920185618.GA28844@rambler-co.ru> References: <bb4a86c70609191415m59a9ef89x91f25e6912339390@mail.gmail.com> <20060919221404.GT94944@alchemy.franken.de> <20060920055715.GA81843@rambler-co.ru> <20060920121017.GU94944@alchemy.franken.de> <20060920122830.GB982@rambler-co.ru> <20060920162105.GC9976@rambler-co.ru> <bb4a86c70609200928i4196c7ceu1a958d815728a5d7@mail.gmail.com> <20060920163710.GA28144@rambler-co.ru> <bb4a86c70609200944x32c0c3cfu60190684f654a642@mail.gmail.com> <20060920185618.GA28844@rambler-co.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
On 9/20/06, Ruslan Ermilov <ru@freebsd.org> wrote: > On Wed, Sep 20, 2006 at 09:44:49AM -0700, Maksim Yevmenkin wrote: > > On 9/20/06, Ruslan Ermilov <ru@freebsd.org> wrote: > > >On Wed, Sep 20, 2006 at 09:28:46AM -0700, Maksim Yevmenkin wrote: > > >> On 9/20/06, Ruslan Ermilov <ru@freebsd.org> wrote: > > >> >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. > > >> > > >> [...] > > >> > > >> actually, i just tracked this down as part of my work on pr > > >> sparc64/96798. there are few problems mentioned in this pr. kbdcontrol > > >> -k not working is just one of them. > > >> > > >> basically, kb_index is wrong, and, in my case, is always 0. which > > >> defaults to first keyboard (i.e. subkbd(4)). that is why i can not use > > >> kbdcontrol -k to switch between sunkbd(4) and, say, ukbd(4). > > >> > > >Yes, this is the endianness bug we were talking about. > > >Hold on, the fix is almost ready. :-) > > > > sure, btw i think CONS_SETKBD is easy. nothing seems to calling it > > from the kernel, so we could (intptr_t *) cast it and it should just > > work. i really want to change it to > > > > #define CONS_SETKBD _IOW('c', 110, int) > > > Yes, it would break both binary and source API compatibility. No > we cannot do it. ok, i just tested the following patch on sparc64 and it makes 'kbdcontrol -k' work as expected. i can now switch between ukbd0 and sunkbd0 without any problems. --- syscons.c.orig Fri Mar 3 16:41:28 2006 +++ syscons.c Wed Sep 20 09:57:09 2006 @@ -1194,7 +1194,7 @@ keyboard_t *newkbd; s = spltty(); - newkbd = kbd_get_keyboard(*(int *)data); + newkbd = kbd_get_keyboard(*(intptr_t *)data); if (newkbd == NULL) { splx(s); return EINVAL; can i commit it? thanks, max p.s. yes, i know, there are few other ioctl's with the same problem. i just want to address it one ioctl at a time :)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bb4a86c70609201204n499a5bc2mb8023c502937a275>