From: Luiz Augusto von Dentz <[email protected]>
This adds CONFIG_BT_HCIBTUSB_POLL_SYNC which can be used to set the
default behavior of Bluetooth USB controller with respect to poll
synchronization of its endpoits.
Signed-off-by: Luiz Augusto von Dentz <[email protected]>
---
drivers/bluetooth/Kconfig | 10 ++++++++++
drivers/bluetooth/btusb.c | 3 +++
2 files changed, 13 insertions(+)
diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig
index e30707405455..fc36057d546d 100644
--- a/drivers/bluetooth/Kconfig
+++ b/drivers/bluetooth/Kconfig
@@ -45,6 +45,16 @@ config BT_HCIBTUSB_AUTOSUSPEND
This can be overridden by passing btusb.enable_autosuspend=[y|n]
on the kernel commandline.
+config BT_HCIBTUSB_POLL_SYNC
+ bool "Enable USB poll_sync for Bluetooth USB devices by default"
+ depends on BT_HCIBTUSB
+ help
+ poll_sync synchronizes the USB data and event endpoints by
+ prioritizing the later.
+
+ Say Y here to enable USB poll_sync for Bluetooth USB devices by
+ default.
+
config BT_HCIBTUSB_BCM
bool "Broadcom protocol support"
depends on BT_HCIBTUSB
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 30dd443f395f..bf978d3659cb 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -32,6 +32,7 @@
static bool disable_scofix;
static bool force_scofix;
static bool enable_autosuspend = IS_ENABLED(CONFIG_BT_HCIBTUSB_AUTOSUSPEND);
+static bool enable_poll_sync = IS_ENABLED(CONFIG_BT_HCIBTUSB_POLL_SYNC);
static bool reset = true;
static struct usb_driver btusb_driver;
@@ -3973,6 +3974,8 @@ static int btusb_probe(struct usb_interface *intf,
if (enable_autosuspend)
usb_enable_autosuspend(data->udev);
+ data->poll_sync = enable_poll_sync;
+
err = hci_register_dev(hdev);
if (err < 0)
goto out_free_dev;
--
2.37.3
From: Luiz Augusto von Dentz <[email protected]>
poll_sync has been proven to fix races of USB data and event endpoints
so this enables it by default.
Signed-off-by: Luiz Augusto von Dentz <[email protected]>
---
drivers/bluetooth/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig
index fc36057d546d..89b4d47b7c79 100644
--- a/drivers/bluetooth/Kconfig
+++ b/drivers/bluetooth/Kconfig
@@ -48,6 +48,7 @@ config BT_HCIBTUSB_AUTOSUSPEND
config BT_HCIBTUSB_POLL_SYNC
bool "Enable USB poll_sync for Bluetooth USB devices by default"
depends on BT_HCIBTUSB
+ default y
help
poll_sync synchronizes the USB data and event endpoints by
prioritizing the later.
--
2.37.3
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=688821
---Test result---
Test Summary:
CheckPatch PASS 3.50 seconds
GitLint PASS 2.13 seconds
SubjectPrefix PASS 1.78 seconds
BuildKernel PASS 33.64 seconds
BuildKernel32 PASS 30.60 seconds
Incremental Build with patchesPASS 52.41 seconds
TestRunner: Setup PASS 505.03 seconds
TestRunner: l2cap-tester PASS 17.27 seconds
TestRunner: iso-tester PASS 16.03 seconds
TestRunner: bnep-tester PASS 6.33 seconds
TestRunner: mgmt-tester PASS 103.82 seconds
TestRunner: rfcomm-tester PASS 10.11 seconds
TestRunner: sco-tester PASS 9.52 seconds
TestRunner: ioctl-tester PASS 10.75 seconds
TestRunner: mesh-tester PASS 7.77 seconds
TestRunner: smp-tester PASS 9.51 seconds
TestRunner: userchan-tester PASS 6.61 seconds
---
Regards,
Linux Bluetooth
Hello:
This series was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <[email protected]>:
On Tue, 25 Oct 2022 14:12:57 -0700 you wrote:
> From: Luiz Augusto von Dentz <[email protected]>
>
> This adds CONFIG_BT_HCIBTUSB_POLL_SYNC which can be used to set the
> default behavior of Bluetooth USB controller with respect to poll
> synchronization of its endpoits.
>
> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
>
> [...]
Here is the summary with links:
- [1/2] Bluetooth: btusb: Add CONFIG_BT_HCIBTUSB_POLL_SYNC
https://git.kernel.org/bluetooth/bluetooth-next/c/f038652da9db
- [2/2] Bluetooth: btusb: Default CONFIG_BT_HCIBTUSB_POLL_SYNC=y
https://git.kernel.org/bluetooth/bluetooth-next/c/aa02d16d9c08
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html