Logitech G510s keyboard fail.

Mehmet Erol Sanliturk m.e.sanliturk at gmail.com
Sun Oct 2 08:58:53 UTC 2016


On Sun, Oct 2, 2016 at 1:26 AM, Lars Engels <lme at freebsd.org> wrote:

> On Wed, Sep 28, 2016 at 10:01:18PM +0200, Hans Petter Selasky wrote:
> > On 09/28/16 20:46, Zaphod Beeblebrox wrote:
> > > Ok... that makes the keyboard attach.  It still says the following on
> dmesg:
> > >
> > > uhid1: <Logitech G510s Gaming Keyboard, class 0/0, rev 2.00/11.72,
> addr 10>
> > > on usbus0
> > > hid_get_item: Number of items(991) truncated to 255
> > > hid_get_item: Number of items(257) truncated to 255
> > > hid_get_item: Number of items(991) truncated to 255
> > > hid_get_item: Number of items(257) truncated to 255
> > > hid_get_item: Number of items(991) truncated to 255
> > > hid_get_item: Number of items(257) truncated to 255
> > >
> > > How do I make this permanent?
> > >
> >
> > Make a patch for sys/dev/usb/quirk/usb_quirk.c . Look at existing
> > keyboard quirks.
>
> There are plenty of patches for the USB quirks coming in much faster
> than new FreeBSD releases are made. Would it be possible to swap out the
> quirks in a port? We could still have the quirks in base but if you
> install the port it would override them?
>



I have another idea ( I am sorry that I can not do it now ) :


Move all of the existent device definitions arrays into XML files .
When a device is detected , load its definition from related XML file
Find its "index" .
By using that "index" , in a case statement do whatever is required such as
obtained from now from internal arrays : load a driver , etc.

This may have two parts : Existing device drivers in FreeBSD and XML
definition specified above .
These will be stored into FreeBSD base directories .


If device definition is not found in FreeBSD base XML definition files ,
the system
will look into following files defined below : If it is found , it will use
it , if it is not found , it will not "panic" but display a proper error
message ( in sufficient detail to be understandable by user ) .


For user devices which they are not in the above XML files :


System will search a predefined device directory in user space for a
possible XML file having definition of the device dedicated to the device
detected : In this file , a driver name should be specified .
FreeBSD will load this driver into user space and execute it .


Sources reading XML files is already present in the FreeBSD .
The only required part is to decode loaded XML file with respect to
elements .


The above structure will allow the companies to produce related XML files
and device drivers and let the users to use them  without requiring
modifications into FreeBSD base system .


If they are not open source , it is the responsibility of the user whether
she/he will use it or not use it .


Such a structure will not require continuous modification in kernel sources
, and recompiling them .
It will move new device drivers into user space .

Later on , on new releases , if it is found useful , such drivers may be
moved into FreeBSD base .



Thank you very much .


Mehmet Erol Sanliturk


More information about the freebsd-hackers mailing list