mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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
This commit is contained in:
parent
6f78736cb1
commit
67cbbf1959
1 changed files with 8 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue