From nobody Fri Oct 07 10:56:39 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MkQH211BTz4V4Bl; Fri, 7 Oct 2022 10:56:46 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4MkQH201rZz3c4H; Fri, 7 Oct 2022 10:56:46 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from [10.36.2.155] (unknown [178.232.223.95]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 6DB162602AC; Fri, 7 Oct 2022 12:56:43 +0200 (CEST) Message-ID: Date: Fri, 7 Oct 2022 12:56:39 +0200 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: git: 55a3bd000d97 - main - usb(4): Make sure the enumeration thread doesn't loop too fast. Content-Language: en-US To: koobs@FreeBSD.org, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202210051013.295ADf7P080520@gitrepo.freebsd.org> <42ae3a83-bb0b-315c-ddfd-919c109a11d2@FreeBSD.org> From: Hans Petter Selasky In-Reply-To: <42ae3a83-bb0b-315c-ddfd-919c109a11d2@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Rspamd-Queue-Id: 4MkQH201rZz3c4H X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On 10/7/22 02:27, Kubilay Kocak wrote: > On 5/10/2022 9:13 pm, Hans Petter Selasky wrote: >> The branch main has been updated by hselasky: >> >> URL: >> https://cgit.FreeBSD.org/src/commit/?id=55a3bd000d9799f431c207e359466484ac63c137 >> >> commit 55a3bd000d9799f431c207e359466484ac63c137 >> Author:     Hans Petter Selasky >> AuthorDate: 2022-06-09 13:15:49 +0000 >> Commit:     Hans Petter Selasky >> CommitDate: 2022-10-05 10:12:33 +0000 >> >>      usb(4): Make sure the enumeration thread doesn't loop too fast. >>      MFC after:      1 week >>      Sponsored by:   NVIDIA Networking >> --- >>   sys/dev/usb/controller/usb_controller.c | 3 +++ >>   1 file changed, 3 insertions(+) >> >> diff --git a/sys/dev/usb/controller/usb_controller.c >> b/sys/dev/usb/controller/usb_controller.c >> index 0897af0492cb..959f54a4583f 100644 >> --- a/sys/dev/usb/controller/usb_controller.c >> +++ b/sys/dev/usb/controller/usb_controller.c >> @@ -414,6 +414,9 @@ usb_bus_explore(struct usb_proc_msg *pm) >>   #if USB_HAVE_ROOT_MOUNT_HOLD >>       usb_root_mount_rel(bus); >>   #endif >> + >> +    /* Nice the enumeration a bit, to avoid looping too fast. */ >> +    usb_pause_mtx(&bus->bus_mtx, USB_MS_TO_TICKS(16)); >>   } >> >> /*------------------------------------------------------------------------* >> > > Is it possible to sysctl (ideally runtime tunable) this setting? > Sure. I'll wrap up a patch. --HPS