Skip to contentSkip to conversation

Bluetooth: hci_qca: only assign wakeup with serial port support

PATCH Applied Zhengping Jiang 3 participants 4 messages Oct 13, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover Bluetooth: hci_qca: only assign wakeup with serial port support

This patch will check if the serial port supports wakeup before assigning the hdev->wakeup callback. After landing the 'commit c1a74160eaf1a ("Bluetooth: hci_qca: Add device_may_wakeup support")', the wake-on-bt was broken in Jacuzzi because the qca_wakeup returns false. In this case it will fall back to the default hci_uart_wakeup.

Changes in v1:
- Check serial port support before assigning wakeup callback

Zhengping Jiang (1):
Bluetooth: hci_qca: only assign wakeup with serial port support

 drivers/bluetooth/hci_qca.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
2.38.0.413.g74048e4d9e-goog
#1 lore raw

PATCH 1/1 Bluetooth: hci_qca: only assign wakeup with serial port support

Only assign hdev->wakeup if the serial port supports wakeup. Otherwise it will fall back to the hci_uart_wakeup or the behavior that can be overridden before calling the hci_uart_register_device().

---

Changes in v1:
- Check serial port support before assigning wakeup callback

 drivers/bluetooth/hci_qca.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/bluetooth/hci_qca.c +2 -1
index 8df11016fd51..dacb6f5efd29 100644
@@ -1765,7 +1765,8 @@ static int qca_setup(struct hci_uart *hu)
 		qca_debugfs_init(hdev);
 		hu->hdev->hw_error = qca_hw_error;
 		hu->hdev->cmd_timeout = qca_cmd_timeout;
-		hu->hdev->wakeup = qca_wakeup;
+		if (device_can_wakeup(hu->serdev->ctrl->dev.parent))
+			hu->hdev->wakeup = qca_wakeup;
 	} else if (ret == -ENOENT) {
 		/* No patch/nvm-config found, run with original fw/config */
 		set_bit(QCA_ROM_FW, &qca->flags);
Signature · 1 line
2.38.0.413.g74048e4d9e-goog
#2 lore raw

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=685198

---Test result---

Test Summary:

CheckPatch                    PASS      1.25 seconds
GitLint                       PASS      0.74 seconds
SubjectPrefix                 PASS      0.62 seconds
BuildKernel                   PASS      34.78 seconds
BuildKernel32                 PASS      30.82 seconds
Incremental Build with patchesPASS      43.19 seconds
TestRunner: Setup             PASS      516.57 seconds
TestRunner: l2cap-tester      PASS      17.46 seconds
TestRunner: iso-tester        PASS      16.66 seconds
TestRunner: bnep-tester       PASS      6.55 seconds
TestRunner: mgmt-tester       PASS      107.54 seconds
TestRunner: rfcomm-tester     PASS      10.42 seconds
TestRunner: sco-tester        PASS      9.87 seconds
TestRunner: ioctl-tester      PASS      11.18 seconds
TestRunner: mesh-tester       PASS      8.18 seconds
TestRunner: smp-tester        PASS      9.89 seconds
TestRunner: userchan-tester   PASS      6.85 seconds

---
Regards,
Linux Bluetooth

#3 lore raw
In reply to Zhengping Jiang
This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <[email protected]>:

Hello:

This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <[email protected]>:

Quoted 10 lines · On Thu, 13 Oct 2022 14:45:07 -0700 you wrote:

This patch will check if the serial port supports wakeup before assigning the hdev->wakeup callback. After landing the 'commit c1a74160eaf1a ("Bluetooth: hci_qca: Add device_may_wakeup support")', the wake-on-bt was broken in Jacuzzi because the qca_wakeup returns false. In this case it will fall back to the default hci_uart_wakeup.

Changes in v1:
- Check serial port support before assigning wakeup callback

[...]

Here is the summary with links:
- [v1,1/1] Bluetooth: hci_qca: only assign wakeup with serial port support

    https://git.kernel.org/bluetooth/bluetooth-next/c/9fe208c7117d

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html