diff mbox series

[1/1] hci_qca: do not interfere with system suspend

Message ID 7687c4239424f2a49c6c596d19eea8dd7ebe8a30.1678226070.git.len.brown@intel.com
State New
Headers show
Series [1/1] hci_qca: do not interfere with system suspend | expand

Commit Message

Len Brown March 7, 2023, 9:56 p.m. UTC
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 mbox series

Patch

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)