Page MenuHomeFreeBSD

ng_ubt: Do not clear stall unconditionally before receiving of HCI command response.
ClosedPublic

Authored by wulf on Apr 15 2021, 1:28 PM.

Details

Summary

Back in 2018 at the time of writing of HCI command execution helper, execution of "clear feature" request at SETUP stage was necessary to workaround probe failures on ng_ubt.ko re-kldloading. Time had passed and circa the summer of 2020 some changes presumably in xhci(4) made the situation to be the opposite. For now the second "clear feature" request triggered by the same kernel thread always fails. Fortunately it happens on 2-nd probe pass when result of probe() handler is ignored, that allows successfull attachment of ng_ubt.
Real reason was not investigated both times.
This change moves "clear feature" request back to the error condition handler where it typically resides as it fixes the problem.

Test Plan

do a # kldload ng_ubt.ko on the host with 8260/8265 Bluetooth USB device connected. Ensure that no "HCI command timeout" error appeared on the terminal.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.