Bluetooth: hci_sync: Fix suspend performance regression
Subsystems (2)
Luiz Augusto von Dentz
maintainerPATCH 1/1 Bluetooth: hci_sync: Fix suspend performance regression
From: Luiz Augusto von Dentz <[email protected]>
This attempts to fix suspend performance when there is no connections by not updating the event mask.
--- net/bluetooth/hci_sync.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-)
net/bluetooth/hci_sync.c +14 -10
@@ -5549,17 +5549,21 @@ int hci_suspend_sync(struct hci_dev *hdev)/* Prevent disconnects from causing scanning to be re-enabled */ hci_pause_scan_sync (hdev); -/* Soft disconnect everything (power off) */ - err =hci_disconnect_all_sync (hdev,HCI_ERROR_REMOTE_POWER_OFF ); -if (err) { -/* Set state to BT_RUNNING so resume doesn't notify */ - hdev->suspend_state =BT_RUNNING ; -hci_resume_sync (hdev); -return err; - } +if (hci_conn_count (hdev)) { +/* Soft disconnect everything (power off) */ + err =hci_disconnect_all_sync (hdev,HCI_ERROR_REMOTE_POWER_OFF ); +if (err) { +/* Set state to BT_RUNNING so resume doesn't notify */ + hdev->suspend_state =BT_RUNNING ; +hci_resume_sync (hdev); +return err; + } -/* Update event mask so only the allowed event can wakeup the host */ -hci_set_event_mask_sync (hdev); +/* Update event mask so only the allowed event can wakeup the +* host. +*/ +hci_set_event_mask_sync (hdev); + }/* Only configure accept list if disconnect succeeded and wake * isn't being prevented.
Signature · 1 line
2.37.1
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=667005
---Test result---
Test Summary:
CheckPatch PASS 0.88 seconds GitLint PASS 0.47 seconds SubjectPrefix PASS 0.29 seconds BuildKernel PASS 32.86 seconds BuildKernel32 PASS 29.48 seconds Incremental Build with patchesPASS 42.50 seconds TestRunner: Setup PASS 491.87 seconds TestRunner: l2cap-tester PASS 17.10 seconds TestRunner: bnep-tester PASS 6.38 seconds TestRunner: mgmt-tester PASS 104.11 seconds TestRunner: rfcomm-tester PASS 10.03 seconds TestRunner: sco-tester PASS 9.69 seconds TestRunner: smp-tester PASS 9.66 seconds TestRunner: userchan-tester PASS 6.73 seconds
---
Regards,
Linux Bluetooth
This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <[email protected]>:
Hello:
This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <[email protected]>:
Quoted 8 lines · On Thu, 11 Aug 2022 14:24:35 -0700 you wrote:
From: Luiz Augusto von Dentz <[email protected]>
This attempts to fix suspend performance when there is no connections by not updating the event mask.
Signed-off-by Luiz Augusto von Dentz <[email protected]>[...]
Here is the summary with links:
- Bluetooth: hci_sync: Fix suspend performance regression
https://git.kernel.org/bluetooth/bluetooth-next/c/4e9f7d8bd56f
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html