Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3696686pxb; Mon, 24 Jan 2022 15:38:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJz039Qay+UXfHw0Yi9tei3McBdKNIYEco6aFYpg5KfZkh0HjG7cnpHBxKSAHmiEBP6Pdw8J X-Received: by 2002:a05:6a00:b42:b0:4c9:ede0:725a with SMTP id p2-20020a056a000b4200b004c9ede0725amr4511918pfo.35.1643067498815; Mon, 24 Jan 2022 15:38:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643067498; cv=none; d=google.com; s=arc-20160816; b=Qok8o84EtBvn5USySwnhigl6HN6tI8hG9Hz4weXibYnTfuGk7gvTJN24ucz7oyTxZ2 poeNKj+vdMcCIzQW4VYyfMG1+f4/K3J+KlvUdMEDECbF5cd48+N98ey7nFED1wWNpflh JULHTwhAxCGNC8DJb9SJTYhX2ixKkCeIFfQM5f7Ddf0uZpY2bJoPICV6SuAJ5XqcRnJo GG7CwGjpl3mQhiFkJHDBDDZgcycRMRVE9POz0ephV7LNE8qkDe44eAxm6QwN0E6BuL0w 4hsaSjg3YcEQNmHs4cN3EkIVKQuoCRwQDAUhN6Ot8esClgoRt+iW67eeuhWUBK4G+RrW gHww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ni/2fAaN5KIBcCwGJmfD9UtAaQxvjAmzSbRBXaLteoc=; b=vL8ccbiwT52WEwr7ZPtjgoUwh9zjf5EPFiW53BpkiXKwSiLmQkgPshOEn2UeSxl2B2 zO2FBamia6HWehvsiRc8L4gPKaXumXToJh31kuHylv9SGB6W1PNxcYGxJn7W9i+bcqrR n9MT2MrAk4qVxMuFiYcfvPrPkxqsWNGgBz1nb9TpsRb4E3xwBNTrYdQDxK9YrXXlK0R0 E1N9w3tOggZWAHMjW8//LhdRTeZeG3i0BSFdRVaII0dl/teaI2LZvhsKmk1NULylzFch YQJztD7NfjluxNdrEBS/BaHczRkjVJN4Mxq8bIssLNMjaGHhSYLVVXT8o0AIPUsj3WmA iqhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=saDtUQuo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 20si13922992pll.297.2022.01.24.15.38.07; Mon, 24 Jan 2022 15:38:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=saDtUQuo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346017AbiAXXdG (ORCPT + 99 others); Mon, 24 Jan 2022 18:33:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355089AbiAXWlr (ORCPT ); Mon, 24 Jan 2022 17:41:47 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B3E0C047CF7; Mon, 24 Jan 2022 13:05:05 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 59A9FB81057; Mon, 24 Jan 2022 21:05:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 830DFC340E7; Mon, 24 Jan 2022 21:05:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643058303; bh=wstrC+IV/cNIbO9MQU9ClBIKDF2ZwJOJuBP3G7iJnG8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=saDtUQuoghDWsTbRFFVEwqdq96llmyWwmvFSCouBEEsMXHQa7On9WdDz/eHO3c6sL aGINcA8fuSLsJMm4tWct1K9mWuGuig7/XowIgqprYa5Xv6rB+ABDt8jUmhTEICzYTU F69cYJAMOnmnW/wBii+YTClDOweCGv5aYH+mhIFw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mark-yw Chen , Sean Wang , Marcel Holtmann , Sasha Levin Subject: [PATCH 5.16 0228/1039] Bluetooth: btmtksdio: fix resume failure Date: Mon, 24 Jan 2022 19:33:37 +0100 Message-Id: <20220124184132.990201935@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sean Wang [ Upstream commit 561ae1d46a8ddcbc13162d5771f5ed6c8249e730 ] btmtksdio have to rely on MMC_PM_KEEP_POWER in pm_flags to avoid that SDIO power is being shut off during the device is in suspend. That fixes the SDIO command fails to access the bus after the device is resumed. Fixes: 7f3c563c575e7 ("Bluetooth: btmtksdio: Add runtime PM support to SDIO based Bluetooth") Co-developed-by: Mark-yw Chen Signed-off-by: Mark-yw Chen Signed-off-by: Sean Wang Signed-off-by: Marcel Holtmann Signed-off-by: Sasha Levin --- drivers/bluetooth/btmtksdio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/bluetooth/btmtksdio.c b/drivers/bluetooth/btmtksdio.c index 9872ef18f9fea..1cbdeca1fdc4a 100644 --- a/drivers/bluetooth/btmtksdio.c +++ b/drivers/bluetooth/btmtksdio.c @@ -1042,6 +1042,8 @@ static int btmtksdio_runtime_suspend(struct device *dev) if (!bdev) return 0; + sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER); + sdio_claim_host(bdev->func); sdio_writel(bdev->func, C_FW_OWN_REQ_SET, MTK_REG_CHLPCR, &err); -- 2.34.1