提交 d0990b28 编写于 作者: S Sean Wang 提交者: Zheng Zengkai

Bluetooth: btmtksdio: fix resume failure

stable inclusion
from stable-v5.10.94
commit ec121517ac8d95a67a1b6ee6dc3102d64a4aa87b
bugzilla: https://gitee.com/openeuler/kernel/issues/I531X9

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ec121517ac8d95a67a1b6ee6dc3102d64a4aa87b

--------------------------------

[ Upstream commit 561ae1d4 ]

btmtksdio have to rely on MMC_PM_KEEP_POWER in pm_flags to avoid that
SDIO power is being shut off during the device is in suspend. That fixes
the SDIO command fails to access the bus after the device is resumed.

Fixes: 7f3c563c ("Bluetooth: btmtksdio: Add runtime PM support to SDIO based Bluetooth")
Co-developed-by: NMark-yw Chen <mark-yw.chen@mediatek.com>
Signed-off-by: NMark-yw Chen <mark-yw.chen@mediatek.com>
Signed-off-by: NSean Wang <sean.wang@mediatek.com>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
上级 2ab1503c
...@@ -1042,6 +1042,8 @@ static int btmtksdio_runtime_suspend(struct device *dev) ...@@ -1042,6 +1042,8 @@ static int btmtksdio_runtime_suspend(struct device *dev)
if (!bdev) if (!bdev)
return 0; return 0;
sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER);
sdio_claim_host(bdev->func); sdio_claim_host(bdev->func);
sdio_writel(bdev->func, C_FW_OWN_REQ_SET, MTK_REG_CHLPCR, &err); sdio_writel(bdev->func, C_FW_OWN_REQ_SET, MTK_REG_CHLPCR, &err);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册