From owner-freebsd-usb@FreeBSD.ORG Mon Jul 27 19:50:04 2009 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4798E106567D; Mon, 27 Jul 2009 19:50:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 2045E8FC2E; Mon, 27 Jul 2009 19:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n6RJo3Cd021174; Mon, 27 Jul 2009 19:50:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n6RJo3Po021172; Mon, 27 Jul 2009 19:50:03 GMT (envelope-from gnats) Resent-Date: Mon, 27 Jul 2009 19:50:03 GMT Resent-Message-Id: <200907271950.n6RJo3Po021172@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@freebsd.org (GNATS Filer) Resent-To: freebsd-usb@FreeBSD.org Resent-Cc: thompsa@freebsd.org, alfred@freebsd.org, hselasky@c2i.net Resent-Reply-To: FreeBSD-gnats-submit@freebsd.org, Eygene Ryabinkin Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7FAE71065677 for ; Mon, 27 Jul 2009 19:45:01 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id 162BE8FC0A for ; Mon, 27 Jul 2009 19:45:01 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from phoenix.codelabs.ru (ppp85-141-160-233.pppoe.mtu-net.ru [85.141.160.233]) by 0.mx.codelabs.ru with esmtps (TLSv1:CAMELLIA256-SHA:256) id 1MVW83-000O17-E8 for FreeBSD-gnats-submit@freebsd.org; Mon, 27 Jul 2009 23:45:00 +0400 Message-Id: <20090727194459.393CFB8090@phoenix.codelabs.ru> Date: Mon, 27 Jul 2009 23:44:59 +0400 (MSD) From: Eygene Ryabinkin To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 X-GNATS-Notify: thompsa@freebsd.org, alfred@freebsd.org, hselasky@c2i.net Cc: Subject: usb/137189: [usb][patch] create and use sysctl nodes for HID report descriptors X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Eygene Ryabinkin List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jul 2009 19:50:04 -0000 >Number: 137189 >Category: usb >Synopsis: [usb][patch] create and use sysctl nodes for HID report descriptors >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jul 27 19:50:03 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Eygene Ryabinkin >Release: FreeBSD 8.0-BETA2 amd64 >Organization: Code Labs >Environment: System: FreeBSD 8.0-BETA2 amd64 >Description: usbhidctl in 8.x can dump report descriptors only from the uhid(4) devices. When, for example, ums(4) or ukbd(4) grab HID devices, there is no way to dump and decode their descriptors via usbhidctl. >How-To-Repeat: Run 'usbhidctl -f /dev/ums0 -d' and see how it will fail. >Fix: The following patch makes kernel-side changes: it introduces general framework to create opaque sysctl nodes 'dev...hiddesc' that are exporting HID descriptor to the userspace. --- 0003-UHID-implement-new-sysctl-node-hiddesc.patch begins here --- begin 644 0003-UHID-implement-new-sysctl-node-hiddesc.patch M1G)O;2`S-3,R931F-3EC,#6=E;F4@4GEA8FEN M:VEN(#QR96$M9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U7,O9&5V M+W5S8B]U"P*(`E]"B`)2!W86YT('-U8V@@7-C=&Q?:&%N M9&QEF4I"BM["BL):68@*&1E"AD978I+`HK M"2`@("!365-#5$Q?0TA)3$1214XH9&5V:6-E7V=E=%]S>7-C=&Q?=')E92AD M978I*2P**PD@("`@3TE$7T%55$\L(")H:61D97-C(BP@0U1,5%E015]35%)) M3D=\0U1,1DQ!1U]21"P**PD@("`@9&5S8RP@*&EN="ES:7IE+"!H:61?7-C=&Q?:&%N9&QE MF5?="!S:7IE*3L*("-E M;F1I9@D)"0D)+RH@7TM%4DY%3"`J+PH@(V5N9&EF"0D)"0DO*B!?55-"7TA) 51%](7R`J+PHM+2`*,2XV+C,N,0H* ` end --- 0003-UHID-implement-new-sysctl-node-hiddesc.patch ends here --- This patch handles user-level stuff: libusbhid is extended with the new function that obtains HID report descriptor from all available places (currently, from the sysctl and iocal calls). usbhidctl is modified to use this new API function. --- 0004-libusbhid-use-new-sysctl-node-hiddesc-to-get-HID-des.patch begins here --- begin 644 0004-libusbhid-use-new-sysctl-node-hiddesc-to-get-HID-des.patch M1G)O;2`X96(V-F4V.#9B,C1B-V1F9&8S831C83$W-38U,34U,&,V93EF,F%F M($UO;B!397`@,3<@,#`Z,#`Z,#`@,C`P,0I&6=E;F4@4GEA8FEN M:VEN(#QR96$M9F)S9$!C;V1E;&%B3H@17EG96YE(%)Y86)I;FMI;B`\7,O9&5V+W5S8B]U M7!E7-C=&PN:#X*(`H@ M(VEN8VQU9&4@/&%S7!E+F@^"B`C:6YC M;'5D92`\97)R;F\N:#X**R-I;F-L=61E(#QF8VYT;"YH/@H@(VEN8VQU9&4@ M/'-T9&QI8BYH/@H@(VEN8VQU9&4@/'-TPHK"2\J(&-H96-K M('-I>F4@*B\**PEI9B`H;&5N(#T](#`I"BL)"7)E='5R;B`P.PHK"BL)+RH@ M8VAE8VL@14Y$7T-/3$Q%0U1)3TX@*B\**PEI9B`H*&1A=&$I6VQE;B`M(#%= M("$](#!X0S`I"BL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F9S971]+B`J+PHK(V1E9FEN90E51T1?34%84TE:10DV M-34S-0HK"B!S=')U8W0@=7-B7V=E;E]D97-C"`T.#4T,3AF+BXU93`T,34U(#$P,#8T-`HM M+2T@82]URelease-Note: >Audit-Trail: >Unformatted: