This is a note to let you know that I've just added the patch titled Bluetooth: Re-order clearing suspend tasks to the 5.8-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: bluetooth-re-order-clearing-suspend-tasks.patch and it can be found in the queue-5.8 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit fc78cefcb4a6ddffd17047325ad00c82d46ba33c Author: Abhishek Pandit-Subedi <abhishekpandit@xxxxxxxxxxxx> Date: Wed Sep 9 16:53:59 2020 -0700 Bluetooth: Re-order clearing suspend tasks [ Upstream commit 3eec158d5eca7dd455118d9e00568aad2371219f ] 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@xxxxxxxxxxxx> Signed-off-by: Marcel Holtmann <marcel@xxxxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 0f4e5a31f983c..131d29e902a30 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -3618,8 +3618,8 @@ void hci_unregister_dev(struct hci_dev *hdev) cancel_work_sync(&hdev->power_on); - unregister_pm_notifier(&hdev->suspend_notifier); hci_suspend_clear_tasks(hdev); + unregister_pm_notifier(&hdev->suspend_notifier); cancel_work_sync(&hdev->suspend_prepare); hci_dev_do_close(hdev);