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)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Thu, 1 Sep 2022 21:51:41 +0000 (14:51 -0700)
commitfd3f106677bac70437dc12e76c827294ed495a44
treede2ba1356d1968340f3937a4d6a610ad32dc0fc1
parenta0476f6a2cac012c0aee4dc981a53e1414cea069
Bluetooth: btusb: mediatek: fix WMT failure during runtime suspend

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>
drivers/bluetooth/btusb.c