From owner-freebsd-usb@FreeBSD.ORG Tue Jul 28 12:13:34 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 C3D341065670; Tue, 28 Jul 2009 12:13:34 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe04.swip.net [212.247.154.97]) by mx1.freebsd.org (Postfix) with ESMTP id 2D9708FC16; Tue, 28 Jul 2009 12:13:33 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=52VOGAJ3MIIA:10 a=gg2W7PyvkLb8p4ie143lBA==:17 a=jxbd0BV5kS9fsDMDDDQA:9 a=4-JJz88T7MbVBei2hCWl4VX1qJAA:4 a=2sKOWodI12Q33Vc8:21 a=7AhYMOYhiiWgki1J:21 Received: from [194.248.135.20] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe04.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 1286386361; Tue, 28 Jul 2009 14:13:32 +0200 From: Hans Petter Selasky To: rea-fbsd@codelabs.ru Date: Tue, 28 Jul 2009 14:13:25 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA2; KDE/4.2.4; i386; ; ) References: <20090727194459.393CFB8090@phoenix.codelabs.ru> <8RwwU1KLz1ezvFiU9HsY6uoNfkU@nflB3XSqYRRHWdyVHMOFGnCK5Pk> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907281413.26204.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org, bug-followup@freebsd.org Subject: Re: 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 List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jul 2009 12:13:35 -0000 On Tuesday 28 July 2009 13:51:43 Eygene Ryabinkin wrote: > Hans Petter, good day. > > HPS wrote: > > Can you change your patch, so that usbhidctl uses libusb to get the > > HID descriptor, instead of sysctl? > > I can, but how to relate the device name under devfs to the descriptor > to be retrieved? By unit number and device address, like usbconfig. > I can enumerate all HID descriptors via libusb, but I > can't currently say which device uses them. Try: usbconfig show_ifdrv > And I don't want to torture > users with the crawl over the list of all vendor/device pairs for the > discovered HID descriptors and ask to choose one -- that's not > productive. > > Why do you dislike the sysctl approach? It is simple and reliable. It's duplicating access to data. There is not that much wrong about it, except it will not work if the device is of another kind. I.E. you would have to patch the HID sysctl node into every driver accessing HID descriptors? --HPS