Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: btrtl: fix RTL8761B/BU broken LE extended scan
@ 2026-04-29 15:13 Alexej Sidorenko
  2026-04-29 16:43 ` bluez.test.bot
  2026-05-04 17:10 ` [PATCH] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Alexej Sidorenko @ 2026-04-29 15:13 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: marcel, luiz.dentz, linux-kernel, Alexej Sidorenko

RTL8761B and RTL8761BU devices report HCI version 5.1 but do not
support the LE Extended Scan commands. This causes repeated failures
with Opcode 0x2042 (LE Set Extended Scan Parameters) returning -EBUSY
when BlueZ attempts extended scanning while a connection is active.

Set HCI_QUIRK_BROKEN_EXT_SCAN for CHIP_ID_8761B to make BlueZ fall
back to legacy LE scan commands which the firmware supports correctly.

Tested with RTL8761BU (USB ID 0bda:a728) where the issue manifested
as continuous 'Opcode 0x2042 failed: -16' errors in dmesg whenever
a BLE connection was active.

Signed-off-by: Alexej Sidorenko <alexej@sidorenko.cz>
---
 drivers/bluetooth/btrtl.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c
index 62f9d4df3..49ecb18fe 100644
--- a/drivers/bluetooth/btrtl.c
+++ b/drivers/bluetooth/btrtl.c
@@ -1342,6 +1342,19 @@ void btrtl_set_quirks(struct hci_dev *hdev, struct btrtl_device_info *btrtl_dev)
 	if (!btrtl_dev->ic_info)
 		return;
 
+	switch (btrtl_dev->project_id) {
+	case CHIP_ID_8761B:
+		/* RTL8761B/BU reports HCI version 5.1 but does not support
+		 * the LE Extended Scan commands (Opcode 0x2042), causing
+		 * repeated -EBUSY failures when BlueZ attempts extended
+		 * scanning while a connection is active.
+		 */
+		hci_set_quirk(hdev, HCI_QUIRK_BROKEN_EXT_SCAN);
+		break;
+	default:
+		break;
+	}
+
 	switch (btrtl_dev->ic_info->lmp_subver) {
 	case RTL_ROM_LMP_8703B:
 		/* 8723CS reports two pages for local ext features,
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: Bluetooth: btrtl: fix RTL8761B/BU broken LE extended scan
  2026-04-29 15:13 [PATCH] Bluetooth: btrtl: fix RTL8761B/BU broken LE extended scan Alexej Sidorenko
@ 2026-04-29 16:43 ` bluez.test.bot
  2026-05-04 17:10 ` [PATCH] " patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2026-04-29 16:43 UTC (permalink / raw)
  To: linux-bluetooth, alexej

[-- Attachment #1: Type: text/plain, Size: 882 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=1087576

---Test result---

Test Summary:
CheckPatch                    PASS      0.72 seconds
GitLint                       PASS      0.33 seconds
SubjectPrefix                 PASS      0.16 seconds
BuildKernel                   PASS      25.55 seconds
CheckAllWarning               PASS      28.38 seconds
CheckSparse                   PASS      26.93 seconds
BuildKernel32                 PASS      25.18 seconds
TestRunnerSetup               PASS      561.16 seconds
IncrementalBuild              PASS      24.22 seconds



https://github.com/bluez/bluetooth-next/pull/133

---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Bluetooth: btrtl: fix RTL8761B/BU broken LE extended scan
  2026-04-29 15:13 [PATCH] Bluetooth: btrtl: fix RTL8761B/BU broken LE extended scan Alexej Sidorenko
  2026-04-29 16:43 ` bluez.test.bot
@ 2026-05-04 17:10 ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2026-05-04 17:10 UTC (permalink / raw)
  To: Alexej Sidorenko; +Cc: linux-bluetooth, marcel, luiz.dentz, linux-kernel

Hello:

This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Wed, 29 Apr 2026 17:13:43 +0200 you wrote:
> RTL8761B and RTL8761BU devices report HCI version 5.1 but do not
> support the LE Extended Scan commands. This causes repeated failures
> with Opcode 0x2042 (LE Set Extended Scan Parameters) returning -EBUSY
> when BlueZ attempts extended scanning while a connection is active.
> 
> Set HCI_QUIRK_BROKEN_EXT_SCAN for CHIP_ID_8761B to make BlueZ fall
> back to legacy LE scan commands which the firmware supports correctly.
> 
> [...]

Here is the summary with links:
  - Bluetooth: btrtl: fix RTL8761B/BU broken LE extended scan
    https://git.kernel.org/bluetooth/bluetooth-next/c/89edeb1e260b

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-05-04 17:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-29 15:13 [PATCH] Bluetooth: btrtl: fix RTL8761B/BU broken LE extended scan Alexej Sidorenko
2026-04-29 16:43 ` bluez.test.bot
2026-05-04 17:10 ` [PATCH] " patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox