git: 97aedd3395b4 - main - devctl: Disable the boottime optimization of suppressing NOMATCH

From: Warner Losh <imp_at_FreeBSD.org>
Date: Sat, 18 May 2024 13:10:13 UTC
The branch main has been updated by imp:

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

commit 97aedd3395b4e9b017e29823096771aff0835ff0
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2024-05-18 13:07:16 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-05-18 13:07:16 +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
---
 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");