]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
Bluetooth: hci_h5: Fix (runtime)suspend issues on RTL8723BS HCIs
authorHans de Goede <hdegoede@redhat.com>
Mon, 20 Sep 2021 12:57:39 +0000 (14:57 +0200)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 7 Dec 2021 06:32:53 +0000 (07:32 +0100)
commit2d8736dc8b9ce98af1784c36315524af78ade966
tree7d91a571c59227e4b7740386207f059a118a08f6
parent77c30634c214a8c7e907e22f2e5566da52e6ec2b
Bluetooth: hci_h5: Fix (runtime)suspend issues on RTL8723BS HCIs

BugLink: https://bugs.launchpad.net/bugs/1951822
[ Upstream commit 9a9023f314873241a43b5a2b96e9c0caaa958433 ]

The recently added H5_WAKEUP_DISABLE h5->flags flag gets checked in
h5_btrtl_open(), but it gets set in h5_serdev_probe() *after*
calling  hci_uart_register_device() and thus after h5_btrtl_open()
is called, set this flag earlier.

Also on devices where suspend/resume involves fully re-probing the HCI,
runtime-pm suspend should not be used, make the runtime-pm setup
conditional on the H5_WAKEUP_DISABLE flag too.

This fixes the HCI being removed and then re-added every 10 seconds
because it was being reprobed as soon as it was runtime-suspended.

Fixes: 66f077dde749 ("Bluetooth: hci_h5: add WAKEUP_DISABLE flag")
Fixes: d9dd833cf6d2 ("Bluetooth: hci_h5: Add runtime suspend")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Archie Pusaka <apusaka@chromium.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/bluetooth/hci_h5.c