From owner-freebsd-usb@FreeBSD.ORG Tue Jul 28 12:20:03 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 0CF9D106564A for ; Tue, 28 Jul 2009 12:20:03 +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 EDFA38FC1B for ; Tue, 28 Jul 2009 12:20:02 +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 n6SCK2Cm024346 for ; Tue, 28 Jul 2009 12:20:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n6SCK2M4024345; Tue, 28 Jul 2009 12:20:02 GMT (envelope-from gnats) Date: Tue, 28 Jul 2009 12:20:02 GMT Message-Id: <200907281220.n6SCK2M4024345@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Hans Petter Selasky Cc: 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 Reply-To: Hans Petter Selasky 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:20:03 -0000 The following reply was made to PR usb/137189; it has been noted by GNATS. From: Hans Petter Selasky To: rea-fbsd@codelabs.ru Cc: bug-followup@freebsd.org, freebsd-usb@freebsd.org Subject: Re: usb/137189: [usb][patch] create and use sysctl nodes for HID report descriptors Date: Tue, 28 Jul 2009 14:13:25 +0200 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