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 10:34:41 +0000 (12:34 +0200)
commitd091771f511dded5d03b028c6c6559fdf34e886f
treeff821f7a3bd1924a914a1bc3d4c20123decbbf74
parentf91e25cfa5538e930ec8f91aab1168e6c94755ef
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