From patchwork Thu Aug 13 21:49:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Wang X-Patchwork-Id: 11713055 X-Patchwork-Delegate: nbd@nbd.name Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 81AFD739 for ; Thu, 13 Aug 2020 21:49:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6987020829 for ; Thu, 13 Aug 2020 21:49:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="fbqxBg2v" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726427AbgHMVt6 (ORCPT ); Thu, 13 Aug 2020 17:49:58 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:10123 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726192AbgHMVt6 (ORCPT ); Thu, 13 Aug 2020 17:49:58 -0400 X-UUID: 9fb9d79f40ec4b2582e8845f8addbbf4-20200814 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=rD0m4doqCUrNGdW0dCK8TkYRyBtDiT5wCBqL1d3SJ2o=; b=fbqxBg2vdVmgE6fdEP8F75F3gcCfFqPaZKhM49Ezmx0+J7cPTTx15dOL37leD00HY6q37KAyhPGzrF2XBERTkLv6D7DnDbAbiAzavKaJRE84bl46eVlnbQ2NaiAa9DbDafBgTDkDCzeYv2w/agbUF4vp/GEifkQz6xxST3KHBJQ=; X-UUID: 9fb9d79f40ec4b2582e8845f8addbbf4-20200814 Received: from mtkcas08.mediatek.inc [(172.21.101.126)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1728308026; Fri, 14 Aug 2020 05:49:50 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs01n1.mediatek.inc (172.21.101.68) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 14 Aug 2020 05:49:49 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 14 Aug 2020 05:49:49 +0800 From: To: , CC: , , , YN Chen Subject: [PATCH] mt76: mt7663s: fix resume failure Date: Fri, 14 Aug 2020 05:49:47 +0800 Message-ID: X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-MTK: N Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Sean Wang MT7663s have to rely on MMC_PM_KEEP_POWER in pm_flags for to avoid SDIO power is being shut off. To fix sdio access failure like "mt7663s mmc1:0001:1: sdio write failed: -22" for the first sdio command to access the bus in the resume handler. Fixes: a66cbdd6573d ("mt76: mt7615: introduce mt7663s support") Co-developed-by: YN Chen Signed-off-by: YN Chen Signed-off-by: Sean Wang --- drivers/net/wireless/mediatek/mt76/mt7615/sdio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/sdio.c b/drivers/net/wireless/mediatek/mt76/mt7615/sdio.c index b018a9675c1a..56f65345d048 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/sdio.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/sdio.c @@ -424,6 +424,8 @@ static int mt7663s_suspend(struct device *dev) return err; } + sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER); + mt76s_stop_txrx(&mdev->mt76); return mt7615_mcu_set_fw_ctrl(mdev);