Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Jul 2009 08:20:03 GMT
From:      Hans Petter Selasky <hselasky@c2i.net>
To:        freebsd-usb@FreeBSD.org
Subject:   Re: usb/137189: [usb][patch] create and use sysctl nodes for HID report descriptors
Message-ID:  <200907310820.n6V8K3nP085258@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR usb/137189; it has been noted by GNATS.

From: Hans Petter Selasky <hselasky@c2i.net>
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: Fri, 31 Jul 2009 09:19:03 +0200

 On Thursday 30 July 2009 22:38:12 Eygene Ryabinkin wrote:
 > Hans Petter, good day.
 >
 > Tue, Jul 28, 2009 at 07:40:27PM +0400, Eygene Ryabinkin wrote:
 > > HPS wrote:
 > > > > 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?
 > >
 > > Just now -- yes, I'll need it.  But probably I can move this
 > > functionality into the USB bus level -- it will automatically create
 > > this sysctl node for all HID children and will dispose it on the detach.
 > > usb_probe_and_attach() is a candidate for such functionality.  Will it
 > > be bad?
 >
 > OK, attached is the reworked version of the sysctl patch: it now creates
 > the needed nodes automatically (though they still can be created by
 > explicit call from the driver, as in uhid(4)).  As a bonus, kernel got the
 > ability to install per-USB class post-attach and pre-detach handlers, so
 > we can do some class-specific things for every driver.  What do you think
 > of it?
 
 Hi,
 
 I think it's too much code to doo too little, and adds extra complexity, and 
 that doing this via libusb would be much more generic.
 
 --HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907310820.n6V8K3nP085258>