linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Osipenko <digetx@gmail.com>
To: Howard Chung <howardchung@google.com>, linux-bluetooth@vger.kernel.org
Cc: alainm@chromium.org, mmandlik@chromium.org, mcchou@chromium.org,
	marcel@holtmann.org, abhishekpandit@chromium.org,
	apusaka@chromium.org, "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH v1] Bluetooth: Set missing suspend task bits
Date: Mon, 21 Dec 2020 17:35:00 +0300	[thread overview]
Message-ID: <ec27a562-d53b-a947-1a93-bd55a2dfcc91@gmail.com> (raw)
In-Reply-To: <20201204111038.v1.1.I4557a89427f61427e65d85bc51cca9e65607488e@changeid>

04.12.2020 06:14, Howard Chung пишет:
> From: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
> 
> When suspending, mark SUSPEND_SCAN_ENABLE and SUSPEND_SCAN_DISABLE tasks
> correctly when either classic or le scanning is modified.
> 
> Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
> Signed-off-by: Howard Chung <howardchung@google.com>
> Reviewed-by: Alain Michaud <alainm@chromium.org>
> ---
> 
>  net/bluetooth/hci_request.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c
> index 80dc451d6e124..71bffd7454720 100644
> --- a/net/bluetooth/hci_request.c
> +++ b/net/bluetooth/hci_request.c
> @@ -707,6 +707,9 @@ void hci_req_add_le_scan_disable(struct hci_request *req, bool rpa_le_conn)
>  		return;
>  	}
>  
> +	if (hdev->suspended)
> +		set_bit(SUSPEND_SCAN_DISABLE, hdev->suspend_tasks);
> +
>  	if (use_ext_scan(hdev)) {
>  		struct hci_cp_le_set_ext_scan_enable cp;
>  
> @@ -1159,6 +1162,11 @@ static void hci_req_set_event_filter(struct hci_request *req)
>  		scan = SCAN_PAGE;
>  	}
>  
> +	if (scan)
> +		set_bit(SUSPEND_SCAN_ENABLE, hdev->suspend_tasks);
> +	else
> +		set_bit(SUSPEND_SCAN_DISABLE, hdev->suspend_tasks);
> +
>  	hci_req_add(req, HCI_OP_WRITE_SCAN_ENABLE, 1, &scan);
>  }
>  
> 

Hi,

This commit caused a regression on entering into suspend for Broadcom
Bluetooth 4330 on Nexus 7:

 Bluetooth: hci0: Timed out waiting for suspend events
 Bluetooth: hci0: Suspend timeout bit: 4
 Bluetooth: hci0: Suspend notifier action (3) failed: -110

I don't see this problem using BCM4329 chip on another device.

Please fix, thanks in advance.

  parent reply	other threads:[~2020-12-21 18:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-04  3:14 [PATCH v1] Bluetooth: Set missing suspend task bits Howard Chung
2020-12-04  4:08 ` [v1] " bluez.test.bot
2020-12-04  9:55 ` [PATCH v1] " Marcel Holtmann
2020-12-21 14:35 ` Dmitry Osipenko [this message]
2020-12-21 17:58   ` Abhishek Pandit-Subedi
2020-12-21 18:19     ` Dmitry Osipenko

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=ec27a562-d53b-a947-1a93-bd55a2dfcc91@gmail.com \
    --to=digetx@gmail.com \
    --cc=abhishekpandit@chromium.org \
    --cc=alainm@chromium.org \
    --cc=apusaka@chromium.org \
    --cc=davem@davemloft.net \
    --cc=howardchung@google.com \
    --cc=johan.hedberg@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=mcchou@chromium.org \
    --cc=mmandlik@chromium.org \
    --cc=netdev@vger.kernel.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).