Bug 203429 - RTL8822BE (USB id 13d3:3526) rfkill unblock fails 1 out of 3 attempts
Summary: RTL8822BE (USB id 13d3:3526) rfkill unblock fails 1 out of 3 attempts
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Bluetooth (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: linux-bluetooth@vger.kernel.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-26 08:34 UTC by João Paulo Rechi Vita
Modified: 2019-04-26 08:34 UTC (History)
0 users

See Also:
Kernel Version: 5.0.0
Subsystem:
Regression: No
Bisected commit-id:


Attachments
btmon logs (1.63 KB, text/plain)
2019-04-26 08:34 UTC, João Paulo Rechi Vita
Details
dyndbg trace (1.25 KB, text/plain)
2019-04-26 08:34 UTC, João Paulo Rechi Vita
Details

Description João Paulo Rechi Vita 2019-04-26 08:34:24 UTC
Created attachment 282539 [details]
btmon logs

When rfkill un-blocking this controller using the Bluetooth settings panel on gnome-control-center, about 1 out of 3 attempts fail. We can see in the kernel logs (with dynamic debug enabled) and in btmon that a HCI reset is getting a timeout.

Interestingly, the problem is only reproducible if there was a LE scanning procedure running before the rfkill switch was blocked. So blocking and unblocking the adapter in a loop like the one bellow does not hit the problem:

  while true ; do echo 1 > /sys/class/rfkill/rfkill2/soft ; sleep 1 ; do echo 0 > /sys/class/rfkill/rfkill2/soft ; sleep 3 ; done

But if I also run another loop in parallel trying to start a LE scan (which fails most of the time because the adapter is OFF, but things align and a scan starts quite a few times), the problem reproduces very easily:

  while true ; do btmgmt find -l ; done
Comment 1 João Paulo Rechi Vita 2019-04-26 08:34:57 UTC
Created attachment 282541 [details]
dyndbg trace

Note You need to log in before you can comment on or make changes to this bug.