Bluetooth: btusb: mediatek: fix WMT failure during runtime suspend
authorSean Wang <sean.wang@mediatek.com>
Thu, 11 Aug 2022 00:49:07 +0000 (08:49 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 11:25:19 +0000 (13:25 +0200)
commitea1b6b54098ce4e6203d806c1f5a526db6e42f68
tree513a5b055401fb30f92e0fd1c845f7fd0cd4d8fe
parent07194ccbb14c97e8bf3d52a417fabfe1bf32b6db
Bluetooth: btusb: mediatek: fix WMT failure during runtime suspend

[ Upstream commit fd3f106677bac70437dc12e76c827294ed495a44 ]

WMT cmd/event doesn't follow up the generic HCI cmd/event handling, it
needs constantly polling control pipe until the host received the WMT
event, thus, we should require to specifically acquire PM counter on the
USB to prevent the interface from entering auto suspended while WMT
cmd/event in progress.

Fixes: a1c49c434e15 ("Bluetooth: btusb: Add protocol support for MediaTek MT7668U USB devices")
Co-developed-by: Jing Cai <jing.cai@mediatek.com>
Signed-off-by: Jing Cai <jing.cai@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/bluetooth/btusb.c