From: Marcel Holtmann <marcel@holtmann.org>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 2/3] Bluetooth: Fix handling of SUSPEND_DISCONNECTING
Date: Wed, 6 Oct 2021 10:50:25 +0200 [thread overview]
Message-ID: <99A705EE-4A28-448B-907D-8C89778BF217@holtmann.org> (raw)
In-Reply-To: <20211006010935.902645-2-luiz.dentz@gmail.com>
Hi Luiz,
> When SUSPEND_DISCONNECTING bit is set that means Disconnect is pending
> but the code was evaluating if the list is empty before calling
> hci_conn_del which does the actual cleanup and remove the connection
> from the list thus the bit is never cleared causing the suspend
> procedure to always timeout when there are connections to be
> disconnected:
>
> Suspend/Resume - Success 5 (Pairing - Legacy) - waiting done
> Set the system into Suspend via force_suspend
> = mgmt-tester: Suspend/Resume - Success 5 (Pairing -.. 17:03:13.200458
> = mgmt-tester: Set the system into Suspend via force_suspend 17:03:13.205812
> < HCI Command: Write Scan E.. (0x03|0x001a) plen 1 #122 [hci0] 17:03:13.213561
> Scan enable: No Scans (0x00)
>> HCI Event: Command Complete (0x0e) plen 4 #123 [hci0] 17:03:13.214710
> Write Scan Enable (0x03|0x001a) ncmd 1
> Status: Success (0x00)
> < HCI Command: Disconnect (0x01|0x0006) plen 3 #124 [hci0] 17:03:13.215830
> Handle: 42
> Reason: Remote Device Terminated due to Power Off (0x15)
>> HCI Event: Command Status (0x0f) plen 4 #125 [hci0] 17:03:13.216602
> Disconnect (0x01|0x0006) ncmd 1
> Status: Success (0x00)
>> HCI Event: Disconnect Complete (0x05) plen 4 #126 [hci0] 17:03:13.217342
> Status: Success (0x00)
> Handle: 42
> Reason: Remote Device Terminated due to Power Off (0x15)
> @ MGMT Event: Device Disconn.. (0x000c) plen 8 {0x0002} [hci0] 17:03:13.217688
> BR/EDR Address: 00:AA:01:01:00:00 (Intel Corporation)
> Reason: Connection terminated by local host for suspend (0x05)
> @ MGMT Event: Device Disconn.. (0x000c) plen 8 {0x0001} [hci0] 17:03:13.217688
> BR/EDR Address: 00:AA:01:01:00:00 (Intel Corporation)
> Reason: Connection terminated by local host for suspend (0x05)
> Suspend/Resume - Success 5 (Pairing - Legacy) - test timed out
> = mgmt-tester: Suspend/Resume - Success 5 (Pairing -.. 17:03:13.939317
> Suspend/Resume - Success 5 (Pairing - Legacy) - teardown
> = mgmt-tester: Suspend/Resume - Success 5 (Pairing -.. 17:03:13.947267
> [ 13.284291] Bluetooth: hci0: Timed out waiting for suspend events
> [ 13.287324] Bluetooth: hci0: Suspend timeout bit: 6
>
> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> ---
> net/bluetooth/hci_event.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel
next prev parent reply other threads:[~2021-10-06 8:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-06 1:09 [PATCH 1/3] Bluetooth: hci_vhci: Fix calling hci_{suspend,resume}_dev Luiz Augusto von Dentz
2021-10-06 1:09 ` [PATCH 2/3] Bluetooth: Fix handling of SUSPEND_DISCONNECTING Luiz Augusto von Dentz
2021-10-06 8:50 ` Marcel Holtmann [this message]
2021-10-06 1:09 ` [PATCH 3/3] Bluetooth: Fix wake up suspend_wait_q prematurely Luiz Augusto von Dentz
2021-10-06 8:50 ` Marcel Holtmann
2021-10-06 8:58 ` [PATCH 1/3] Bluetooth: hci_vhci: Fix calling hci_{suspend,resume}_dev Marcel Holtmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=99A705EE-4A28-448B-907D-8C89778BF217@holtmann.org \
--to=marcel@holtmann.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.