Commit 7e901bca authored by Zhao Qunqin's avatar Zhao Qunqin Committed by Hongchen Zhang
Browse files

blutetooth/btusb: delay 1ms while suspending

LoongArch inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/IBQ4JL


CVE: NA

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

There are suspend, resume and suspend before hibernation, Loongson need
to wait until the previous resume is completely over before the last
suspending. Otherwise, it may cause S4 suspend failure in Loongson
platform.

Signed-off-by: default avatarZhao Qunqin <zhaoqunqin@loongson.cn>
Change-Id: Ia4e6924d934d467a139f43e236c1156db609b71a
parent cf5e7fb0
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -4645,6 +4645,9 @@ static int btusb_suspend(struct usb_interface *intf, pm_message_t message)
	if (data->suspend_count++)
		return 0;

#ifdef CONFIG_LOONGARCH
	mdelay(1);
#endif
	spin_lock_irq(&data->txlock);
	if (!(PMSG_IS_AUTO(message) && data->tx_in_flight)) {
		set_bit(BTUSB_SUSPENDING, &data->flags);