From patchwork Wed Dec 19 06:28:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bough Chen X-Patchwork-Id: 10736787 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9C1FB14E2 for ; Wed, 19 Dec 2018 06:28:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 777502999C for ; Wed, 19 Dec 2018 06:28:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 66744299E5; Wed, 19 Dec 2018 06:28:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EDB202999C for ; Wed, 19 Dec 2018 06:28:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726706AbeLSG2j (ORCPT ); Wed, 19 Dec 2018 01:28:39 -0500 Received: from mail-eopbgr80045.outbound.protection.outlook.com ([40.107.8.45]:5507 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725290AbeLSG2i (ORCPT ); Wed, 19 Dec 2018 01:28:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=f2bJXywFnCk49OMXfmOjwZymOTtwggsLahFqR4bgC3U=; b=P7uOj4iYDkfaLkpZIRz1qK48xlqxPeqb1lBUdaIrWgdZfHSDfg4s9wRmkGY0i9uuwkR+jWTod7BVArNLRzgcRF66fF/Eei4UfiBDpwdpXLiCUcTzrezNqB5reu3Jv8wkst8EqEwCCO9Yj90jMLlF3f/VD7l/mjuZU9G7kvArj/E= Received: from VI1PR04MB5040.eurprd04.prod.outlook.com (20.177.50.97) by VI1PR04MB5933.eurprd04.prod.outlook.com (20.178.205.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1446.17; Wed, 19 Dec 2018 06:28:35 +0000 Received: from VI1PR04MB5040.eurprd04.prod.outlook.com ([fe80::cd3d:ce97:132b:7148]) by VI1PR04MB5040.eurprd04.prod.outlook.com ([fe80::cd3d:ce97:132b:7148%3]) with mapi id 15.20.1446.018; Wed, 19 Dec 2018 06:28:34 +0000 From: BOUGH CHEN To: "adrian.hunter@intel.com" , "ulf.hansson@linaro.org" CC: "linux-mmc@vger.kernel.org" , dl-linux-imx , Aisheng Dong Subject: [PATCH] mmc: sdhci: do not enable card detect interrupt for gpio cd type Thread-Topic: [PATCH] mmc: sdhci: do not enable card detect interrupt for gpio cd type Thread-Index: AQHUl2QR9EyoY+ypFkKdVaiNcHOPlA== Date: Wed, 19 Dec 2018 06:28:34 +0000 Message-ID: <1545201350-8298-1-git-send-email-haibo.chen@nxp.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 1.9.1 x-clientproxiedby: HK0PR03CA0090.apcprd03.prod.outlook.com (2603:1096:203:72::30) To VI1PR04MB5040.eurprd04.prod.outlook.com (2603:10a6:803:59::33) authentication-results: spf=none (sender IP is ) smtp.mailfrom=haibo.chen@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [92.121.68.129] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;VI1PR04MB5933;6:GM+DuQwpCMjlx4f9q4LIisWEQeJidrvnmbB2UhD5Xw+8YQu//+gF7z+q3wZJy8RAj7+WeVpjtCglv9HGva1+NLvELrwWI/pbac0Q2UtAoRR63rlJ9KjOeFILnaubyyD4DGyfOe3tqUDI+9ZKEmrhKKe/OKDIdd0FOB/yFGCkSMXdTG+Jgy1fuqjG7+Jgs7rP/IdQTHFOFfpyIdywqKxH72qhJnOVsiYIqMLwKOujhgbIQxxbLxxYHvCSWCh4HFiV7IWhbmcJExocTTO4lk2mbV00iKWfqN6P6mfmUlpdNa1wk6Ov8ZtTuYEOlSongLZabayEOqXXKVNU6hvHvdKwpB3Anu4BMqoMrbMFoaj5Vt3Y2n+lxREtOLkdSKF2ZTI3W26Kgbf+Uzg5n7R7wnO3Nmwvpf4Nj5CVQ9tt7E+vrGudKNgtYXO70Xu0XWNDr77uUIJ45iPyaFmfY30fPvAHuQ==;5:3JDRxifUyDtYQKky/JiDxfxF1S5EYEU0P3CR8FuluQz+xA2Khlj2jmWgFZO42ZnVzjEJ0McVPVXLzCUO0Fs6m4albfwF/sy467cs0cameBjsB7Hc7NvhDcGVo7BRZ4HY4rr+1BFvNOauQrC9WEXqDPd8COTCOKNByKM37fEF59A=;7:t/ziSG2dc24ieOzKOD8N8TuYkD5ogSI1jaC8zjfbsbUnNWxUXgytAeTq34i+9uAUaHnS7svU5QDsCibwA9VupSsU8edZmFMoXrKJ6N48GG572hW3Fz3Tda0mIPgzs6QdMkGfUzOEZMCJjJlIT5+/PQ== x-ms-office365-filtering-correlation-id: b91b9e2b-8754-49e1-e527-08d6657b33b3 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:VI1PR04MB5933; x-ms-traffictypediagnostic: VI1PR04MB5933: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(3230021)(999002)(5005020)(6040522)(2401047)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231475)(944501520)(52105112)(6055026)(148016)(149066)(150057)(6041310)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(201708071742011)(7699051)(76991095);SRVR:VI1PR04MB5933;BCL:0;PCL:0;RULEID:;SRVR:VI1PR04MB5933; x-forefront-prvs: 0891BC3F3D x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39860400002)(366004)(136003)(396003)(346002)(376002)(199004)(189003)(2616005)(14444005)(476003)(99286004)(256004)(36756003)(81156014)(81166006)(68736007)(86362001)(6512007)(6436002)(2501003)(53936002)(316002)(6116002)(3846002)(50226002)(478600001)(110136005)(14454004)(8676002)(97736004)(8936002)(5660300001)(102836004)(386003)(6486002)(6506007)(26005)(305945005)(66066001)(71200400001)(7736002)(71190400001)(54906003)(2906002)(25786009)(486006)(53346004)(4326008)(186003)(52116002)(105586002)(106356001);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR04MB5933;H:VI1PR04MB5040.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: KAmclmZYvIDmhkeCiMUwovZsoRzitJETbInMSHqD1+AJwKC9JDZtRVj5D4H+Ev/nBPpAOxj3SmjJvL50bsrVIt/VLMlm9BHrafOrse6R9VOJYf9+j/hsIeTfn0qMFL5Dffi8RRjvHyeLgZtnEy4Mcy5Hjw7p+udzVeTiduNRmYjER6S37JsG/FJMb1arxxR3pu3+mJKa9icEOnqEWLg3GWrulowpMcZb7ZZEETQhGezaS7vCTI7u3WSrlu3BmJM/FdhE00iNJdsMTWAbc+rCyRFUPg4m/+gldB35LjIJL5mGSJ8o2dAIACxf/pHhD+NM spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b91b9e2b-8754-49e1-e527-08d6657b33b3 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Dec 2018 06:28:34.8248 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5933 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Except SDHCI_QUIRK_BROKEN_CARD_DETECTION and MMC_CAP_NONREMOVABLE, we also do not need to handle controller native card detect interrupt for gpio cd type. If we wrong enabled the card detect interrupt for gpio case, it will cause a lot of unexpected card detect interrupts during data transfer which should not happen. Signed-off-by: Haibo Chen --- drivers/mmc/host/sdhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 5de845b..67e43ec 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -156,7 +156,7 @@ static void sdhci_set_card_detection(struct sdhci_host *host, bool enable) u32 present; if ((host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) || - !mmc_card_is_removable(host->mmc)) + !mmc_card_is_removable(host->mmc) || mmc_can_gpio_cd(host->mmc)) return; if (enable) {