Skip to contentSkip to conversation

Bluetooth: btusb: Don't suspend when there are connections

PATCH In review Luiz Augusto von Dentz 2 participants 2 messages May 2, 2023 Bluetooth drivers

lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH v3 1/1 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.

---
 drivers/bluetooth/btusb.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/bluetooth/btusb.c +4 -0
index 2a8e2bb038f5..dcf1c4f5042b 100644
@@ -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;
 
Signature · 1 line
2.40.0
#1 lore raw

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