Skip to contentSkip to conversation

Bluetooth: hci_core: Fix not handling hibernation actions

PATCH Applied Luiz Augusto von Dentz 2 participants 2 messages Aug 21, 2024 – Aug 23, 2024

Subsystems (2)
lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH 1/1 Bluetooth: hci_core: Fix not handling hibernation actions

From: Luiz Augusto von Dentz <[email protected]>

This fixes not handling hibernation actions on suspend notifier so they are treated in the same way as regular suspend actions.

---
 net/bluetooth/hci_core.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
net/bluetooth/hci_core.c +8 -2
index f25a21f532aa..d6976db02c06 100644
@@ -2406,10 +2406,16 @@ static int hci_suspend_notifier(struct notifier_block *nb, unsigned long action,
 	/* To avoid a potential race with hci_unregister_dev. */
 	hci_dev_hold(hdev);
 
-	if (action == PM_SUSPEND_PREPARE)
+	switch (action) {
+	case PM_HIBERNATION_PREPARE:
+	case PM_SUSPEND_PREPARE:
 		ret = hci_suspend_dev(hdev);
-	else if (action == PM_POST_SUSPEND)
+		break;
+	case PM_POST_HIBERNATION:
+	case PM_POST_SUSPEND:
 		ret = hci_resume_dev(hdev);
+		break;
+	}
 
 	if (ret)
 		bt_dev_err(hdev, "Suspend notifier action (%lu) failed: %d",
Signature · 1 line
2.46.0
#1 lore raw
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 8 lines · On Wed, 21 Aug 2024 14:43:35 -0400 you wrote:

From: Luiz Augusto von Dentz <[email protected]>

This fixes not handling hibernation actions on suspend notifier so they are treated in the same way as regular suspend actions.

[...]

Here is the summary with links:
- [v1] Bluetooth: hci_core: Fix not handling hibernation actions

    https://git.kernel.org/bluetooth/bluetooth-next/c/4e7280557a45

You are awesome, thank you!

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