Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ef4f3b65 authored by Kai-Heng Feng's avatar Kai-Heng Feng Committed by Greg Kroah-Hartman
Browse files

libata: Use per port sync for detach



[ Upstream commit b5292111de9bb70cba3489075970889765302136 ]

Commit 130f4caf145c ("libata: Ensure ata_port probe has completed before
detach") may cause system freeze during suspend.

Using async_synchronize_full() in PM callbacks is wrong, since async
callbacks that are already scheduled may wait for not-yet-scheduled
callbacks, causes a circular dependency.

Instead of using big hammer like async_synchronize_full(), use async
cookie to make sure port probe are synced, without affecting other
scheduled PM callbacks.

Fixes: 130f4caf145c ("libata: Ensure ata_port probe has completed before detach")
Suggested-by: default avatarJohn Garry <john.garry@huawei.com>
Signed-off-by: default avatarKai-Heng Feng <kai.heng.feng@canonical.com>
Tested-by: default avatarJohn Garry <john.garry@huawei.com>
BugLink: https://bugs.launchpad.net/bugs/1867983


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 81344ae5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment