Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Jan 2021 16:30:30 -0800
From:      John Baldwin <jhb@FreeBSD.org>
To:        Vladimir Kondratyev <vladimir@kondratyev.su>, Vladimir Kondratyev <wulf@FreeBSD.org>, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   Re: git: 0f0379fa5581 - main - hid: Add recently imported drivers to NOTES
Message-ID:  <62f2b009-1436-1871-ac41-19787dd65ac3@FreeBSD.org>
In-Reply-To: <f1627b51-4958-245f-3f4e-0489605f32af@kondratyev.su>
References:  <202101101920.10AJK6rv043957@gitrepo.freebsd.org> <fa5604ed-0bde-079f-3433-72f8311e82cd@FreeBSD.org> <f1627b51-4958-245f-3f4e-0489605f32af@kondratyev.su>

next in thread | previous in thread | raw e-mail | index | archive | help
On 1/11/21 12:08 PM, Vladimir Kondratyev wrote:
> On 11.01.2021 21:11, John Baldwin wrote:
>> On 1/10/21 11:20 AM, Vladimir Kondratyev wrote:
>>> The branch main has been updated by wulf:
>>>
>>> URL: https://cgit.FreeBSD.org/src/commit/?id=0f0379fa5581c6b89d22bd041f7443581bac616c
>>>
>>> commit 0f0379fa5581c6b89d22bd041f7443581bac616c
>>> Author:     Vladimir Kondratyev <wulf@FreeBSD.org>
>>> AuthorDate: 2021-01-09 12:07:19 +0000
>>> Commit:     Vladimir Kondratyev <wulf@FreeBSD.org>
>>> CommitDate: 2021-01-10 19:17:20 +0000
>>>
>>>     hid: Add recently imported drivers to NOTES
>>>     
>>>     Reviewed by:    hselasky
>>>     Differential revision:  https://reviews.freebsd.org/D28060
>>
>> Now that we have entries in NOTES, can we perhaps remove HID_DEBUG
>> from GENERIC
> 
> Some part of HID code belonged to USB previously. That is why HID_DEBUG
> line was inherited from already existing USB_DEBUG in GENERIC.
> If enabling of USB_DEBUG had no relation to HID, we can delete HID_DEBUG.

Ah, I see.  I am somewhat surprised USB_DEBUG is on by default, but
HID_DEBUG being consistent with USB_DEBUG seems ok.

>> along with commented out drivers related to usbhid?
> 
> Yes we can. I'll add mention about minimal number of devices/options
> required to enable usbhid reliably to NOTES and delete driver lines from
> GENERIC.
> I do not want to delete options USBHID_ENABLED as it is about priority
> rather than features. May be, it have a sense to change it name to
> USBHID_DISABLED and enable by default.

I think it would be nice to turn it into a tunable sysctl (hw.usb.prefer_usbhid
or some such) and let usbhid_probe() check the variable associated with that
to determine it's return value.  What I don't understand is why the other USB
drivers exclude their PnP info when this option is enabled?  Can't you just
leave the PnP info enabled and depend on return values of the probe routines to
DTRT?  It does mean devmatch might load a ukbd.ko that doesn't get used?  It
seems like what you kind of want is to have the PnP info present in both drivers
(ukbd.ko and usbhid.ko for example) and let them both load for now but let the
tunable's value determine which driver "wins" (USB drivers are relatively
small, and people who really want exactly one can either compile the desired
one into a custom kernel or use MODULES_OVERRIDE or the like to select which
modules to build).  Eventually if usbhid supplants the other drivers they can be
retired, but the tunable would allow them to coexist for a while, and changing the
default would just be changing the default value of that tunable.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?62f2b009-1436-1871-ac41-19787dd65ac3>