* [PATCH] Bluetooth: hci_sync: Fix suspend performance regression @ 2022-08-11 21:24 Luiz Augusto von Dentz 2022-08-11 22:00 ` bluez.test.bot 2022-08-17 18:52 ` [PATCH] " patchwork-bot+bluetooth 0 siblings, 2 replies; 3+ messages in thread From: Luiz Augusto von Dentz @ 2022-08-11 21:24 UTC (permalink / raw) To: linux-bluetooth From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> This attempts to fix suspend performance when there is no connections by not updating the event mask. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> --- net/bluetooth/hci_sync.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c index 6de2ad730995..74a0cd5d0b37 100644 --- a/net/bluetooth/hci_sync.c +++ b/net/bluetooth/hci_sync.c @@ -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. -- 2.37.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: Bluetooth: hci_sync: Fix suspend performance regression 2022-08-11 21:24 [PATCH] Bluetooth: hci_sync: Fix suspend performance regression Luiz Augusto von Dentz @ 2022-08-11 22:00 ` bluez.test.bot 2022-08-17 18:52 ` [PATCH] " patchwork-bot+bluetooth 1 sibling, 0 replies; 3+ messages in thread From: bluez.test.bot @ 2022-08-11 22:00 UTC (permalink / raw) To: linux-bluetooth, luiz.dentz [-- Attachment #1: Type: text/plain, Size: 1098 bytes --] 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Bluetooth: hci_sync: Fix suspend performance regression 2022-08-11 21:24 [PATCH] Bluetooth: hci_sync: Fix suspend performance regression Luiz Augusto von Dentz 2022-08-11 22:00 ` bluez.test.bot @ 2022-08-17 18:52 ` patchwork-bot+bluetooth 1 sibling, 0 replies; 3+ messages in thread From: patchwork-bot+bluetooth @ 2022-08-17 18:52 UTC (permalink / raw) To: Luiz Augusto von Dentz; +Cc: linux-bluetooth Hello: This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>: On Thu, 11 Aug 2022 14:24:35 -0700 you wrote: > From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> > > This attempts to fix suspend performance when there is no connections by > not updating the event mask. > > Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> > > [...] 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! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-08-17 18:52 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-08-11 21:24 [PATCH] Bluetooth: hci_sync: Fix suspend performance regression Luiz Augusto von Dentz 2022-08-11 22:00 ` bluez.test.bot 2022-08-17 18:52 ` [PATCH] " patchwork-bot+bluetooth
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox