Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Oct 2016 01:58:51 -0700
From:      Mehmet Erol Sanliturk <m.e.sanliturk@gmail.com>
To:        Lars Engels <lme@freebsd.org>
Cc:        Hans Petter Selasky <hps@selasky.org>, Eitan Adler <lists@eitanadler.com>,  Zaphod Beeblebrox <zbeeble@gmail.com>, FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: Logitech G510s keyboard fail.
Message-ID:  <CAOgwaMvejv5A6Ra=eKBA_o1zAGF_zW4U54UXiGu_-nTJKv1EsA@mail.gmail.com>
In-Reply-To: <20161002082609.GC97879@e-new.0x20.net>
References:  <CACpH0Mc7GLk%2BggA3_A_8O_MX5fi%2B-YtFfp-1GUTkOum12Omahg@mail.gmail.com> <f83acf52-0fa2-cf50-afaa-9eb6b74a832c@selasky.org> <CAF6rxg==viV5MpsxnOVKE5-mcR2CJmkpRjZuGCYEjJXmXHHZ7w@mail.gmail.com> <ec4139de-6765-a476-e6d0-0f6e0c1f4724@selasky.org> <CACpH0MfZ=NJ%2B16m7SVQPrRLRvMcLpWP56x0TSdbBBJb6aqg6ag@mail.gmail.com> <4300eab5-dafb-bce6-5b58-24d347202e23@selasky.org> <20161002082609.GC97879@e-new.0x20.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Oct 2, 2016 at 1:26 AM, Lars Engels <lme@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOgwaMvejv5A6Ra=eKBA_o1zAGF_zW4U54UXiGu_-nTJKv1EsA>