From nobody Tue Dec 07 10:41:29 2021 X-Original-To: dev-commits-src-all@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 D90D318C3563; Tue, 7 Dec 2021 10:41:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J7cKj4HjKz4d3v; Tue, 7 Dec 2021 10:41:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 741F81E511; Tue, 7 Dec 2021 10:41:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1B7AfT6q044352; Tue, 7 Dec 2021 10:41:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B7AfTqO044351; Tue, 7 Dec 2021 10:41:29 GMT (envelope-from git) Date: Tue, 7 Dec 2021 10:41:29 GMT Message-Id: <202112071041.1B7AfTqO044351@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: 67cbbf19595d - main - ng_ubt(4): Introduce net.bluetooth.usb_isoc_enable loader tunable to disable isochronous transfers. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 67cbbf19595da4565d3c8603030fdb8d33ed571e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638873689; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=leVcoanWD1HV/VjlxD7V+Lo4evak+DTGSSZBbjXsvN8=; b=I6BwtjJHw5IO5xh91u53T8kw83g0llo8x+tA7xxO1ZX08/HA91z85anOoTyez96wWakPFZ eJXKvEP2QOY+zJb8uaYQ2dj/g6CBaRjxxluYL+7zZAjnqAKxgB9G1eyP9dVeqxwdB/DKEu 9DYvnqp/SiNcGdaDx4kYqRa0LioVjYWQqYjrrzbZzC+YAzodmbh1qMrVUJioLw5kU5Dvce V+wy5zarPo/PTfDzSm8SpLONT0Fr2UMuYM8fM6/YIaza6nysAi2ClaNsE8yqfV8dcIH6rm JI4ZZ7IsZ/jEaj5JREWnc5QigM5JxMUt22f14cX9UsDukt0/xyEzhr1gBLSVzw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638873689; a=rsa-sha256; cv=none; b=XhiklA88xiuSMM3aJInDBGDHKKUeGmiZsfr9bKC4FXZADqF33g6pT1tStevK67PvtNdq0O snOaufN73aMD0CKE8GzsfKWpJP+sDoZEIji7nbukV16zfEYFE9QCcKNuW7pWcodpkWYojz 05/DGMhnu/zcrPGUZKczszOUqHUiuDN9ZQdgLtGfMCmJ7Y71aYzOq7Dlr0/4E63iWO4yNj cSpKQ53D8Bx8pJuYr1oLqdHyCuFCcLr0Gz8xYCNWdaZLlgkKWt3/+4ikxdfrzrrlLvjNz7 u0wwWm7U5Wae1tpbLdK81JBQtxshev1wITwAEe648MG8EtxufX2a4EUrecWvKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=67cbbf19595da4565d3c8603030fdb8d33ed571e commit 67cbbf19595da4565d3c8603030fdb8d33ed571e Author: Hans Petter Selasky AuthorDate: 2021-12-07 10:28:21 +0000 Commit: Hans Petter Selasky CommitDate: 2021-12-07 10:39:49 +0000 ng_ubt(4): Introduce net.bluetooth.usb_isoc_enable loader tunable to disable isochronous transfers. If users want to disable isochronous transfers, which cause high frequency periodic interrupts from the USB host controller, then net.bluetooth.usb_isoc_enable can be set to zero, either as a sysctl(8) or as a loader.conf(5) tunable. Differential Revision: https://reviews.freebsd.org/D33282 Submitted by: naito.yuichiro@gmail.com PR: 238235 MFC after: 1 week Sponsored by: NVIDIA Networking --- sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c index a79a8cd48509..c3820fc872af 100644 --- a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c +++ b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c @@ -152,6 +152,11 @@ static ng_disconnect_t ng_ubt_disconnect; static ng_rcvmsg_t ng_ubt_rcvmsg; static ng_rcvdata_t ng_ubt_rcvdata; +static int ng_usb_isoc_enable = 1; + +SYSCTL_INT(_net_bluetooth, OID_AUTO, usb_isoc_enable, CTLFLAG_RDTUN | CTLFLAG_MPSAFE, + &ng_usb_isoc_enable, 0, "enable isochronous transfers"); + /* Queue length */ static const struct ng_parse_struct_field ng_ubt_node_qlen_type_fields[] = { @@ -742,8 +747,9 @@ ubt_attach(device_t dev) } /* Setup transfers for both interfaces */ - if (usbd_transfer_setup(uaa->device, iface_index, sc->sc_xfer, - ubt_config, UBT_N_TRANSFER, sc, &sc->sc_if_mtx)) { + if (usbd_transfer_setup(uaa->device, iface_index, sc->sc_xfer, ubt_config, + ng_usb_isoc_enable ? UBT_N_TRANSFER : UBT_IF_1_ISOC_DT_RD1, + sc, &sc->sc_if_mtx)) { UBT_ALERT(sc, "could not allocate transfers\n"); goto detach; }