From owner-freebsd-current@FreeBSD.ORG Thu Jun 23 18:24:53 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4509B16A41C for ; Thu, 23 Jun 2005 18:24:53 +0000 (GMT) (envelope-from Maksim.Yevmenkin@savvis.net) Received: from mailgate1b.savvis.net (mailgate1b.savvis.net [216.91.182.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id E4AC543D58 for ; Thu, 23 Jun 2005 18:24:52 +0000 (GMT) (envelope-from Maksim.Yevmenkin@savvis.net) Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgate1b.savvis.net (Postfix) with ESMTP id 042E83C190 for ; Thu, 23 Jun 2005 13:24:52 -0500 (CDT) Received: from mailgate1b.savvis.net ([127.0.0.1]) by localhost (mailgate1b.savvis.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 15418-01-3 for ; Thu, 23 Jun 2005 13:24:51 -0500 (CDT) Received: from out001.email.savvis.net (out001.apptix.savvis.net [216.91.32.44]) by mailgate1b.savvis.net (Postfix) with ESMTP id CD6313BE5C for ; Thu, 23 Jun 2005 13:24:51 -0500 (CDT) Received: from s228130hz1ew031.apptix-01.savvis.net ([10.146.4.28]) by out001.email.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Thu, 23 Jun 2005 13:24:16 -0500 Received: from [10.254.186.111] ([64.14.1.106]) by s228130hz1ew031.apptix-01.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Thu, 23 Jun 2005 13:23:55 -0500 Message-ID: <42BAFE37.4080504@savvis.net> Date: Thu, 23 Jun 2005 11:23:51 -0700 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-current@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 23 Jun 2005 18:23:55.0990 (UTC) FILETIME=[B7533F60:01C57820] X-Virus-Scanned: amavisd-new at savvis.net Subject: request for comments: kbdmux(4) (long) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jun 2005 18:24:53 -0000 Dear Hackers, the next version of experimental keyboard multiplexer (kbdmux(4)) is available at http://www.geocities.com/m_evmenkin/kbdmux-3.tar.gz. at this point i'm almost happy with the code. i have tested it with real usb keyboard and a couple of ps2 keyboards connected to the ps2 to usb adapter. Jun 22 17:59:38 beetle kernel: ukbd1: CHESEN PS2 to USB Converter, rev 1.10/0.10, addr 2, iclass 3/1 Jun 22 17:59:38 beetle kernel: kbd2 at ukbd1 console works, X works. i even dropped into the debugger with ctrl+alt+esc and all keyboards were still working. the remaining issues are - kbdmux model: kbdmux(4) is "super-keyboard" driver that consumes input (raw scancodes) from slave keyboards. the side effect is that _all_ keyboards attached to the kbdmux share the _same_ state. basically user can press ctrl on one keyboard and "C" on another keyboard and it still will work. is that good enough? - locking: right now the code relies on Giant mutex (just like the rest keyboard drivers do); - code duplication: there are a pieces of code that were stolen from atkbd.c. very similar pieces of code exist in ukbd.c, vkbd.c and now in kbdmux.c. imo that is three times too many. perhaps these pieces could be moved into some common shared place? - need comments/input from "non-intel" folks; so, providing the code is good, what is the best why to connect kbdmux(4) to the rest of the system? - should kbdmux(4) be merged with kbd/syscons and used by default? - kbdmux(4) switches all keyboards into K_RAW mode, so if kbdmux(4) is the default keyboard then perhaps all keyboard drivers could be simplified and just return K_RAW scancodes? - if kbdmux(4) is not default keyboard then what syscons(4) should do? look for "kbdmux" keyboard first and the look for any ("*") keyboard? - what kbdcontrol(8) behavior should be? should it be smart enough to recognize if current keyboard is kbdmux and behave differently? - should kbdmux(4) go into 6.x? thanks, max