浏览代码

Bluetooth: btmrvl: disable platform wakeup interrupt in suspend failure path

Host sleep handshake with device might been fail, disable platform wakeup
interrupt in this case.

Reported-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Xinming Hu 8 年之前
父节点
当前提交
6eb7bd6683
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      drivers/bluetooth/btmrvl_sdio.c

+ 7 - 0
drivers/bluetooth/btmrvl_sdio.c

@@ -1630,6 +1630,13 @@ static int btmrvl_sdio_suspend(struct device *dev)
 	if (priv->adapter->hs_state != HS_ACTIVATED) {
 	if (priv->adapter->hs_state != HS_ACTIVATED) {
 		if (btmrvl_enable_hs(priv)) {
 		if (btmrvl_enable_hs(priv)) {
 			BT_ERR("HS not activated, suspend failed!");
 			BT_ERR("HS not activated, suspend failed!");
+			/* Disable platform specific wakeup interrupt */
+			if (card->plt_wake_cfg &&
+			    card->plt_wake_cfg->irq_bt >= 0) {
+				disable_irq_wake(card->plt_wake_cfg->irq_bt);
+				disable_irq(card->plt_wake_cfg->irq_bt);
+			}
+
 			priv->adapter->is_suspending = false;
 			priv->adapter->is_suspending = false;
 			return -EBUSY;
 			return -EBUSY;
 		}
 		}