diff mbox series

Bluetooth: hci_sync: fix hogp device suspend bug

Message ID 20231221071621.1154462-1-15013537245@163.com (mailing list archive)
State New, archived
Headers show
Series Bluetooth: hci_sync: fix hogp device suspend bug | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
tedd_an/GitLint success Gitlint PASS
tedd_an/SubjectPrefix success Gitlint PASS
tedd_an/BuildKernel success BuildKernel PASS
tedd_an/CheckAllWarning success CheckAllWarning PASS
tedd_an/CheckSparse success CheckSparse PASS
tedd_an/CheckSmatch success CheckSparse PASS
tedd_an/BuildKernel32 success BuildKernel32 PASS
tedd_an/TestRunnerSetup success TestRunnerSetup PASS
tedd_an/TestRunner_l2cap-tester success TestRunner PASS
tedd_an/TestRunner_iso-tester success TestRunner PASS
tedd_an/TestRunner_bnep-tester success TestRunner PASS
tedd_an/TestRunner_mgmt-tester success TestRunner PASS
tedd_an/TestRunner_rfcomm-tester success TestRunner PASS
tedd_an/TestRunner_sco-tester success TestRunner PASS
tedd_an/TestRunner_ioctl-tester success TestRunner PASS
tedd_an/TestRunner_mesh-tester success TestRunner PASS
tedd_an/TestRunner_smp-tester success TestRunner PASS
tedd_an/TestRunner_userchan-tester success TestRunner PASS
tedd_an/IncrementalBuild success Incremental Build PASS

Commit Message

15013537245@163.com Dec. 21, 2023, 7:16 a.m. UTC
From: clancy shang <clancy.shang@quectel.com>

when Bluetooth enter suspend, and disconnect everything with the diconnect
reason code of 0x15,the hogp device could not into sleep and continued
advertizing. when use the diconnect reason code of 0x13, the hogp device
into sleep succeeded.

Signed-off-by: clancy shang <clancy.shang@quectel.com>
---
 net/bluetooth/hci_sync.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

bluez.test.bot@gmail.com Dec. 21, 2023, 7:57 a.m. UTC | #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=812044

---Test result---

Test Summary:
CheckPatch                    PASS      0.60 seconds
GitLint                       PASS      0.31 seconds
SubjectPrefix                 PASS      0.12 seconds
BuildKernel                   PASS      27.78 seconds
CheckAllWarning               PASS      31.72 seconds
CheckSparse                   PASS      36.19 seconds
CheckSmatch                   PASS      99.56 seconds
BuildKernel32                 PASS      26.97 seconds
TestRunnerSetup               PASS      434.45 seconds
TestRunner_l2cap-tester       PASS      23.27 seconds
TestRunner_iso-tester         PASS      49.50 seconds
TestRunner_bnep-tester        PASS      7.21 seconds
TestRunner_mgmt-tester        PASS      163.68 seconds
TestRunner_rfcomm-tester      PASS      11.03 seconds
TestRunner_sco-tester         PASS      14.72 seconds
TestRunner_ioctl-tester       PASS      12.25 seconds
TestRunner_mesh-tester        PASS      8.94 seconds
TestRunner_smp-tester         PASS      9.87 seconds
TestRunner_userchan-tester    PASS      7.44 seconds
IncrementalBuild              PASS      26.14 seconds



---
Regards,
Linux Bluetooth
Paul Menzel Dec. 21, 2023, 9:05 a.m. UTC | #2
Dear Clancy,


Thank you for your patch.


Am 21.12.23 um 08:16 schrieb 15013537245@163.com:
> From: clancy shang <clancy.shang@quectel.com>

Not important, but you might want to start your name with a capital letter.

> when Bluetooth enter suspend, and disconnect everything with the diconnect

1.  enter*s*
2.  disconnect*s*
3.  … the di*s*connect …

> reason code of 0x15,the hogp device could not into sleep and continued

Please add a space after the comma.

> advertizing. when use the diconnect reason code of 0x13, the hogp device

1.  adverti*s*ing
2.  di*s*connect

> into sleep succeeded.

going into

What device is it exactly?

> Signed-off-by: clancy shang <clancy.shang@quectel.com>
> ---
>   net/bluetooth/hci_sync.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
> index d85a7091a116..16b5420c32d0 100644
> --- a/net/bluetooth/hci_sync.c
> +++ b/net/bluetooth/hci_sync.c
> @@ -5927,7 +5927,7 @@ int hci_suspend_sync(struct hci_dev *hdev)
>   
>   	if (hci_conn_count(hdev)) {
>   		/* Soft disconnect everything (power off) */
> -		err = hci_disconnect_all_sync(hdev, HCI_ERROR_REMOTE_POWER_OFF);
> +		err = hci_disconnect_all_sync(hdev, HCI_ERROR_REMOTE_USER_TERM);
>   		if (err) {
>   			/* Set state to BT_RUNNING so resume doesn't notify */
>   			hdev->suspend_state = BT_RUNNING;


Kind regards,

Paul
diff mbox series

Patch

diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index d85a7091a116..16b5420c32d0 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -5927,7 +5927,7 @@  int hci_suspend_sync(struct hci_dev *hdev)
 
 	if (hci_conn_count(hdev)) {
 		/* Soft disconnect everything (power off) */
-		err = hci_disconnect_all_sync(hdev, HCI_ERROR_REMOTE_POWER_OFF);
+		err = hci_disconnect_all_sync(hdev, HCI_ERROR_REMOTE_USER_TERM);
 		if (err) {
 			/* Set state to BT_RUNNING so resume doesn't notify */
 			hdev->suspend_state = BT_RUNNING;