From owner-dev-commits-src-main@freebsd.org Tue Jan 12 01:19:30 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 07DD04EC404; Tue, 12 Jan 2021 01:19:30 +0000 (UTC) (envelope-from vladimir@kondratyev.su) Received: from corp.infotel.ru (corp.infotel.ru [195.170.219.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4DFCR55BT8z3jFc; Tue, 12 Jan 2021 01:19:29 +0000 (UTC) (envelope-from vladimir@kondratyev.su) Received: from corp (corp.infotel.ru [195.170.219.3]) by corp.infotel.ru (Postfix) with ESMTP id EE4A9182A99; Tue, 12 Jan 2021 04:19:27 +0300 (MSK) X-Virus-Scanned: amavisd-new at corp.infotel.ru Received: from corp.infotel.ru ([195.170.219.3]) by corp (corp.infotel.ru [195.170.219.3]) (amavisd-new, port 10024) with ESMTP id zBEqllnSpHei; Tue, 12 Jan 2021 04:19:26 +0300 (MSK) Received: from mail.cicgroup.ru (unknown [195.170.219.74]) by corp.infotel.ru (Postfix) with ESMTP id 409F9182A8C; Tue, 12 Jan 2021 04:19:26 +0300 (MSK) Received: from mail.cicgroup.ru (localhost [127.0.0.1]) by mail.cicgroup.ru (Postfix) with ESMTP id 9ED0142211F; Tue, 12 Jan 2021 04:19:24 +0300 (MSK) Received: from mail.cicgroup.ru ([127.0.0.1]) by mail.cicgroup.ru (mail.cicgroup.ru [127.0.0.1]) (amavisd-new, port 10024) with SMTP id RHKCyiewiFaP; Tue, 12 Jan 2021 04:19:17 +0300 (MSK) Received: from [192.168.0.30] (gateway [10.0.2.2]) by mail.cicgroup.ru (Postfix) with ESMTPA id 783B342211C; Tue, 12 Jan 2021 04:19:17 +0300 (MSK) Subject: Re: git: 0f0379fa5581 - main - hid: Add recently imported drivers to NOTES To: John Baldwin , Vladimir Kondratyev , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202101101920.10AJK6rv043957@gitrepo.freebsd.org> <62f2b009-1436-1871-ac41-19787dd65ac3@FreeBSD.org> From: Vladimir Kondratyev Message-ID: <01ee4eac-8d19-1b04-7448-3a8bfc9bd1f7@kondratyev.su> Date: Tue, 12 Jan 2021 04:19:05 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <62f2b009-1436-1871-ac41-19787dd65ac3@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DFCR55BT8z3jFc X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 01:19:30 -0000 On 12.01.2021 03:30, John Baldwin wrote: > 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 >>>> AuthorDate: 2021-01-09 12:07:19 +0000 >>>> Commit: Vladimir Kondratyev >>>> 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. This is good idea. Thanks! 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. I did it to block surprising automatic attachment of low priority driver on kldunloading of high priority one. But while it is very annoying during development, it is irrelevant in everyday use. I will remove PnP info #ifdef-s as in conjunction with aforementioned tunable sysctl, it will allows avoid kernel recompilation.