linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: 15013537245@163.com
Cc: marcel@holtmann.org, johan.hedberg@gmail.com,
	 linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org,
	 "clancy.shang" <clancy.shang@quectel.com>
Subject: Re: [PATCH] Bluetooth: hci_sync: fix BR/EDR wakeup bug
Date: Mon, 27 Nov 2023 09:00:11 -0500	[thread overview]
Message-ID: <CABBYNZ+0CqK=iu77oZfE2oBjD3DisSAcvLRyoUqD+_C=TOs0ZQ@mail.gmail.com> (raw)
In-Reply-To: <20231127090545.117162-1-15013537245@163.com>

Hi,

On Mon, Nov 27, 2023 at 4:06 AM <15013537245@163.com> wrote:
>
> From: "clancy.shang" <clancy.shang@quectel.com>
>
> Steam deck in suspending state, but bt controller send hci
> mode change event to host. cause Steam Deck can't into sleep.

It probably makes sense to add the btmon trace showing the issue.

> Signed-off-by: clancy.shang <clancy.shang@quectel.com>
> ---
>  net/bluetooth/hci_sync.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
> index a15ab0b874a9..a26a58cb2c38 100644
> --- a/net/bluetooth/hci_sync.c
> +++ b/net/bluetooth/hci_sync.c
> @@ -3800,12 +3800,14 @@ static int hci_set_event_mask_sync(struct hci_dev *hdev)
>         if (lmp_bredr_capable(hdev)) {
>                 events[4] |= 0x01; /* Flow Specification Complete */
>
> -               /* Don't set Disconnect Complete when suspended as that
> -                * would wakeup the host when disconnecting due to
> -                * suspend.
> +               /* Don't set Disconnect Complete and mode change when
> +                * suspended as that would wakeup the host when disconnecting
> +                * due to suspend.
>                  */
> -               if (hdev->suspended)
> +               if (hdev->suspended) {
>                         events[0] &= 0xef;
> +                       events[2] &= 0xf7;
> +               }
>         } else {
>                 /* Use a different default for LE-only devices */
>                 memset(events, 0, sizeof(events));
> --
> 2.25.1
>


-- 
Luiz Augusto von Dentz

  parent reply	other threads:[~2023-11-27 14:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-27  9:05 [PATCH] Bluetooth: hci_sync: fix BR/EDR wakeup bug 15013537245
2023-11-27  9:33 ` bluez.test.bot
2023-11-27 14:00 ` Luiz Augusto von Dentz [this message]
2023-11-27 15:08 ` [PATCH] " Paul Menzel
  -- strict thread matches above, loose matches on Subject: below --
2023-12-05  2:41 15013537245
2023-12-14  9:22 15013537245
2023-12-18 10:24 15013537245
2023-12-19 18:28 ` patchwork-bot+bluetooth

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='CABBYNZ+0CqK=iu77oZfE2oBjD3DisSAcvLRyoUqD+_C=TOs0ZQ@mail.gmail.com' \
    --to=luiz.dentz@gmail.com \
    --cc=15013537245@163.com \
    --cc=clancy.shang@quectel.com \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcel@holtmann.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).