diff --git a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c --- a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c +++ b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c @@ -152,6 +152,13 @@ static ng_rcvmsg_t ng_ubt_rcvmsg; static ng_rcvdata_t ng_ubt_rcvdata; +static int ng_ubt_isoc_trans = 1; + +SYSCTL_NODE(_hw, OID_AUTO, ubt, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "UBT"); + +SYSCTL_INT(_hw_ubt, OID_AUTO, isochronous_transfer, CTLFLAG_RDTUN|CTLFLAG_MPSAFE, + &ng_ubt_isoc_trans, 1, "enable isochronous transfer"); + /* Queue length */ static const struct ng_parse_struct_field ng_ubt_node_qlen_type_fields[] = { @@ -735,8 +742,9 @@ } /* 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_ubt_isoc_trans) ? UBT_N_TRANSFER : UBT_N_TRANSFER/2, + sc, &sc->sc_if_mtx)) { UBT_ALERT(sc, "could not allocate transfers\n"); goto detach; } @@ -1541,10 +1549,12 @@ * to send to avoid any delays. */ - ubt_xfer_start(sc, UBT_IF_1_ISOC_DT_RD1); - ubt_xfer_start(sc, UBT_IF_1_ISOC_DT_RD2); - ubt_xfer_start(sc, UBT_IF_1_ISOC_DT_WR1); - ubt_xfer_start(sc, UBT_IF_1_ISOC_DT_WR2); + if (ng_ubt_isoc_trans) { + ubt_xfer_start(sc, UBT_IF_1_ISOC_DT_RD1); + ubt_xfer_start(sc, UBT_IF_1_ISOC_DT_RD2); + ubt_xfer_start(sc, UBT_IF_1_ISOC_DT_WR1); + ubt_xfer_start(sc, UBT_IF_1_ISOC_DT_WR2); + } mtx_unlock(&sc->sc_if_mtx); }