2023-05-02 22:17:12

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: [PATCH v3] Bluetooth: btusb: Don't suspend when there are connections

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

This checks if there are connections before suspending since that may
disrupt the connections making it stop receiving any data if remote
wakeup is not enabled.

Signed-off-by: Luiz Augusto von Dentz <[email protected]>
---
drivers/bluetooth/btusb.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 2a8e2bb038f5..dcf1c4f5042b 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -4523,6 +4523,10 @@ static int btusb_suspend(struct usb_interface *intf, pm_message_t message)

BT_DBG("intf %p", intf);

+ /* Don't suspend if there are connections */
+ if (hci_conn_count(data->hdev))
+ return -EBUSY;
+
if (data->suspend_count++)
return 0;

--
2.40.0


2023-05-02 22:59:01

by bluez.test.bot

[permalink] [raw]
Subject: RE: [v3] Bluetooth: btusb: Don't suspend when there are connections

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

---Test result---

Test Summary:
CheckPatch PASS 0.62 seconds
GitLint PASS 0.29 seconds
SubjectPrefix PASS 0.10 seconds
BuildKernel PASS 33.02 seconds
CheckAllWarning PASS 35.87 seconds
CheckSparse PASS 40.95 seconds
CheckSmatch PASS 110.81 seconds
BuildKernel32 PASS 31.59 seconds
TestRunnerSetup PASS 449.98 seconds
TestRunner_l2cap-tester PASS 17.48 seconds
TestRunner_iso-tester PASS 21.46 seconds
TestRunner_bnep-tester PASS 5.73 seconds
TestRunner_mgmt-tester PASS 116.60 seconds
TestRunner_rfcomm-tester PASS 9.08 seconds
TestRunner_sco-tester PASS 8.39 seconds
TestRunner_ioctl-tester PASS 9.83 seconds
TestRunner_mesh-tester PASS 7.29 seconds
TestRunner_smp-tester PASS 8.30 seconds
TestRunner_userchan-tester PASS 5.98 seconds
IncrementalBuild PASS 29.95 seconds



---
Regards,
Linux Bluetooth