lkml.org 
[lkml]   [2023]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/1] hci_qca: do not interfere with system suspend
Date
When hci_qca returns an error to its pm_ops.suspend routine,
the PM subsystem will terminate the system wide suspend.

It is extremely unlikely that there will ever be a justification
for hci_qca, no matter what its internal malfunction, should
cause system-wide suspend to terminate.

Doing so, could result in the scenario where a laptop lid is closed,
suspend termnates, the user places the running laptop into a breifcase,
not expecting it to be overheating or draining its battery...

This is not a theoretical issue.
The 6.3-rc1 currently fails this way on the Dell XPS-13-9310:

Bluetooth: hci0: SSR or FW download time out
hci_uart_qca serial0-0: PM: dpm_run_callback(): acpi_subsys_suspend+0x0/0x70 returns -110
hci_uart_qca serial0-0: PM: failed to suspend: error -110
PM: suspend of devices aborted after 3218.724 msecs
PM: start suspend of devices aborted after 3246.859 msecs
PM: Some devices failed to suspend, or early wake event detected
PM: resume of devices complete after 84.988 msecs

Signed-off-by: Len Brown <len.brown@intel.com>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Johan Hedberg <johan.hedberg@gmail.com>
Cc: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/bluetooth/hci_qca.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 3df8c3606e93..1795cc527b88 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -2309,7 +2309,7 @@ static int __maybe_unused qca_suspend(struct device *dev)
error:
clear_bit(QCA_SUSPENDING, &qca->flags);

- return ret;
+ return 0;
}

static int __maybe_unused qca_resume(struct device *dev)
--
2.37.2
\
 
 \ /
  Last update: 2023-03-27 00:48    [W:0.021 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site