From: Marcel Holtmann <marcel@holtmann.org>
To: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Cc: linux-bluetooth <linux-bluetooth@vger.kernel.org>,
CrosBT Upstreaming <chromeos-bluetooth-upstreaming@chromium.org>,
"David S. Miller" <davem@davemloft.net>,
Johan Hedberg <johan.hedberg@gmail.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Jakub Kicinski <kuba@kernel.org>
Subject: Re: [PATCH] Bluetooth: Re-order clearing suspend tasks
Date: Fri, 11 Sep 2020 09:06:04 +0200 [thread overview]
Message-ID: <E430CF8E-218C-4C64-B963-57AE70CD11CB@holtmann.org> (raw)
In-Reply-To: <20200909165317.1.Ie55bb8dde9847e8005f24402f3f2d66ea09cd7b2@changeid>
Hi Abhishek,
> Unregister_pm_notifier is a blocking call so suspend tasks should be
> cleared beforehand. Otherwise, the notifier will wait for completion
> before returning (and we encounter a 2s timeout on resume).
>
> Fixes: 0e9952804ec9c8 (Bluetooth: Clear suspend tasks on unregister)
> Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
> ---
> Should have caught that unregister_pm_notifier was blocking last time
> but when testing the earlier patch, I got unlucky and saw that the error
> message was never hit (the suspend timeout).
>
> When re-testing this patch on the same device, I was able to reproduce
> the problem on an older build with the 0e9952804ec9c8 but not on a newer
> build with the same patch. Changing the order correctly fixes it
> everywhere. Confirmed this by adding debug logs in btusb_disconnect and
> hci_suspend_notifier to confirm what order things were getting called.
>
> Sorry about the churn. Next I'm going try to do something about the palm
> shaped indentation on my forehead...
>
> net/bluetooth/hci_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel
next prev parent reply other threads:[~2020-09-11 7:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-09 23:53 Abhishek Pandit-Subedi
2020-09-11 7:06 ` Marcel Holtmann [this message]
2020-09-10 1:40 Abhishek Pandit-Subedi
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=E430CF8E-218C-4C64-B963-57AE70CD11CB@holtmann.org \
--to=marcel@holtmann.org \
--cc=abhishekpandit@chromium.org \
--cc=chromeos-bluetooth-upstreaming@chromium.org \
--cc=davem@davemloft.net \
--cc=johan.hedberg@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®