]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
Bluetooth: btusb: Add CONFIG_BT_HCIBTUSB_POLL_SYNC
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 25 Oct 2022 21:12:57 +0000 (14:12 -0700)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 12 Dec 2022 22:19:24 +0000 (14:19 -0800)
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 <luiz.von.dentz@intel.com>
Tested-by: Tedd Ho-Jeong An <tedd.an@intel.com>
drivers/bluetooth/Kconfig
drivers/bluetooth/btusb.c

index e307074054553a4a9cb2b41a3546caa7f160484a..fc36057d546ddf22a296e65aa78530af2e2a0a06 100644 (file)
@@ -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
index 1a14447fafa82d1c326d7ad10ddc659091590bdb..8f34bf195bae366b07f5f370f8428930cf208a3e 100644 (file)
@@ -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;
@@ -4075,6 +4076,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;