From owner-freebsd-usb@FreeBSD.ORG Fri Jun 26 19:32:55 2009 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B77031065675; Fri, 26 Jun 2009 19:32:55 +0000 (UTC) (envelope-from christoph@rosenkeller.org) Received: from rosenkeller.org (fry.rose.uni-jena.de [141.35.60.60]) by mx1.freebsd.org (Postfix) with ESMTP id 6C5EC8FC15; Fri, 26 Jun 2009 19:32:55 +0000 (UTC) (envelope-from christoph@rosenkeller.org) Received: by rosenkeller.org (Postfix, from userid 65534) id 7CBD3264211; Fri, 26 Jun 2009 21:32:48 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by rosenkeller.org (Postfix) with ESMTP id 633F3264211; Fri, 26 Jun 2009 21:32:48 +0200 (CEST) Received: from rosenkeller.org ([127.0.0.1]) by localhost (fry.localnet.rose [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 12716-09; Fri, 26 Jun 2009 21:32:36 +0200 (CEST) Received: from [192.168.0.2] (cable-static-237-100.teleport.ch [213.188.237.100]) by rosenkeller.org (Postfix) with ESMTPSA id CAE7526420F; Fri, 26 Jun 2009 21:32:32 +0200 (CEST) Message-ID: <4A45225B.1010503@rosenkeller.org> Date: Fri, 26 Jun 2009 21:32:43 +0200 From: Christoph Langguth User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: freebsd-usb@freebsd.org References: <4A0DC89C.6010708@rosenkeller.org> <200905162158.22210.hselasky@c2i.net> <4A0F25C5.9020706@rosenkeller.org> <200906020937.20466.hselasky@c2i.net> In-Reply-To: <200906020937.20466.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at rosenkeller.org X-Spam-Status: No, score=-4.311 tagged_above=-99 required=5 tests=[ALL_TRUSTED=-1.8, AWL=0.088, BAYES_00=-2.599] X-Spam-Score: -4.311 X-Spam-Level: Cc: Rui Paulo Subject: Re: How to add support for Macbook Pro (USB) keyboard? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2009 19:32:56 -0000 Hans Petter Selasky schrieb: > Hi Christoph! > > Rui Paulo has an additional patch for ukbd.c. Can you look at it and verify? > > --HPS > > > > Here's how it worked: > http://wiki.freebsd.org/AppleMacbook#head-7eab3730c3bf3d04bdfb0d1d3649eaddf2fed595 > > If there's any problem with the userland approach, I would like to know. > If there isn't, please consider removing the kenrel support for the > eject key. > > > I have looked inside this a bit deeper. While the usbhidctl approach doesn't really work for this keyboard at the moment, here are my observations: - the keyboard is only handled by *either* ukbd *or* uhid. In fact, if unpatched, uhid will not even try to consider the device because of the following code inside uhid.c's uhid_probe() function: if (uaa->use_generic == 0) { /* give Mouse and Keyboard drivers a try first */ return (ENXIO); } That means that the keyboard always ends up as device ukbdX, and never as uhidY. Before even trying to get it to work using uhid, I think this is the issue that needs to be sorted out: Can a device be handled by *two* independent drivers at once? - If so, how? - If not, what could a possible solution be? Thanks & cheers, Chris