From nobody Fri Jan 07 13:30:54 2022 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 9BAF219404D9; Fri, 7 Jan 2022 13:30:56 +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 4JVkcv3p8bz4hXC; Fri, 7 Jan 2022 13:30:55 +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 EBC8B422E; Fri, 7 Jan 2022 13:30:54 +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 207DUscu030599; Fri, 7 Jan 2022 13:30:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 207DUsTo030598; Fri, 7 Jan 2022 13:30:54 GMT (envelope-from git) Date: Fri, 7 Jan 2022 13:30:54 GMT Message-Id: <202201071330.207DUsTo030598@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 7b976be508ce - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 7b976be508ce7bbb9652687d20a98d2e4b2d5a5b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1641562255; 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=943zw/gH6o4DGIm/hzLUGr2UNsMNP5pQQRqk/8Lv61c=; b=moLT8ryF3rCHe7DY1n0gGHHfvmMuaOxoSkcR4iHHPo83/3Gv2VAnLIDliiqi39LEj5Mztl +bSuK9MuTyl2zaFWaNb0cHNYgAoHBy+VldzgkiTT0xv7OKIZXTOlnowMjkPE4BQxQmI1xY OABrMLs4UicsJt1hJeih0x3Nq3ATULILRCf7Zkqt7b6UxH2/iI6TrDKD9DvYHr8TUydX4W vHALVk7Ti8MW4ZrLYCCC0lXdhvHx1kATREGbbPZxM7xwnQRKTR90z3Q0rtoqKbeq5NSypm M7QVQPk9k4Nauaev7J8kysd0xAsf0sMTz9I5DML5bVeIezX5gT2CNWSGJFL8Dg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1641562255; a=rsa-sha256; cv=none; b=Ur9Chf0KKUIXNb/fgxUFREfkQNr3oxPwLXf43Z4NvtkwiNh/yrJCyGjwm6i8rBF+5grdvJ i+jcWlg04rvxkDOPmJRucoPlyo0gJuysveR8S5UPuzbgqE6neN4s+xADqCLYCjW471IVSG FSu7rWcLM3elP+JRoYvjnpAk/hAQnyzMK6eZ/dUh21HVggwyYsx7BRjbPVf1iYQjRINgZ1 ecyGHIDtgzVnPYPgAZPUnWohdsjgv6Nfpdf2Bv/bpgpAalZidv5jk5hzpbj5vlRwxhv9VJ lfpm2IbXqOM5/JfdbTPgv/Re19UikvyYCYxvWQ4ZmAWnIP5xHUGVkCtL73r0dg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=7b976be508ce7bbb9652687d20a98d2e4b2d5a5b commit 7b976be508ce7bbb9652687d20a98d2e4b2d5a5b Author: Hans Petter Selasky AuthorDate: 2021-12-07 10:28:21 +0000 Commit: Hans Petter Selasky CommitDate: 2022-01-07 13:23:10 +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 Sponsored by: NVIDIA Networking (cherry picked from commit 67cbbf19595da4565d3c8603030fdb8d33ed571e) (cherry picked from commit 03f0393477db4c11f8dc4166fadc2628b2c15ae9) (cherry picked from commit 8fa952937bbe44a0fdd17348adfbbfd44aef6004) --- sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c | 11 +++++++++-- 1 file changed, 9 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..dee829336331 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_RWTUN | 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; } @@ -2007,5 +2013,6 @@ DRIVER_MODULE(ng_ubt, uhub, ubt_driver, ubt_devclass, ubt_modevent, 0); MODULE_VERSION(ng_ubt, NG_BLUETOOTH_VERSION); MODULE_DEPEND(ng_ubt, netgraph, NG_ABI_VERSION, NG_ABI_VERSION, NG_ABI_VERSION); MODULE_DEPEND(ng_ubt, ng_hci, NG_BLUETOOTH_VERSION, NG_BLUETOOTH_VERSION, NG_BLUETOOTH_VERSION); +MODULE_DEPEND(ng_ubt, ng_bluetooth, NG_BLUETOOTH_VERSION, NG_BLUETOOTH_VERSION, NG_BLUETOOTH_VERSION); MODULE_DEPEND(ng_ubt, usb, 1, 1, 1); USB_PNP_HOST_INFO(ubt_devs);