git: f9c67a0f203f - stable/14 - devctl: Disable the boottime optimization of suppressing NOMATCH

From: Warner Losh <imp_at_FreeBSD.org>
Date: Wed, 22 May 2024 14:38:01 UTC
The branch stable/14 has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=f9c67a0f203fe3bf4fa83f38bcd5963ea568142d

commit f9c67a0f203fe3bf4fa83f38bcd5963ea568142d
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2024-05-18 13:07:16 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-05-22 14:37:58 +0000

    devctl: Disable the boottime optimization of suppressing NOMATCH
    
    The usb bus code (uhub) doens't present the same information to devctl
    as it does to the NOMATCH events it generats. As such, devmatch fails to
    find USB devices on boot when NOMATCH events are optimized out. Since
    the savings of boot time is relatively trivial for all but the most
    demanding boot environments, disable it by default until this issue is
    fixed.
    
    Fixes: 6437872c1d66
    MFC After: 1 minute
    Sponsored by:           Netflix
    
    (cherry picked from commit 97aedd3395b4e9b017e29823096771aff0835ff0)
---
 sys/kern/kern_devctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/kern/kern_devctl.c b/sys/kern/kern_devctl.c
index 0dd05a49c9ad..602b82105525 100644
--- a/sys/kern/kern_devctl.c
+++ b/sys/kern/kern_devctl.c
@@ -89,7 +89,7 @@ static int sysctl_devctl_queue(SYSCTL_HANDLER_ARGS);
 static int devctl_queue_length = DEVCTL_DEFAULT_QUEUE_LEN;
 SYSCTL_PROC(_hw_bus, OID_AUTO, devctl_queue, CTLTYPE_INT | CTLFLAG_RWTUN |
     CTLFLAG_MPSAFE, NULL, 0, sysctl_devctl_queue, "I", "devctl queue length");
-static bool nomatch_enabled = false;
+static bool nomatch_enabled = true;
 SYSCTL_BOOL(_hw_bus, OID_AUTO, devctl_nomatch_enabled, CTLFLAG_RWTUN,
     &nomatch_enabled, 0, "enable nomatch events");