From patchwork Fri Apr 15 17:29:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aisheng Dong X-Patchwork-Id: 8854331 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9977ABF29F for ; Fri, 15 Apr 2016 17:53:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B79F720211 for ; Fri, 15 Apr 2016 17:53:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DCC2920218 for ; Fri, 15 Apr 2016 17:53:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751050AbcDORxI (ORCPT ); Fri, 15 Apr 2016 13:53:08 -0400 Received: from mail-bn1bon0057.outbound.protection.outlook.com ([157.56.111.57]:54559 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750910AbcDORxF (ORCPT ); Fri, 15 Apr 2016 13:53:05 -0400 Received: from BY2PR03CA011.namprd03.prod.outlook.com (10.255.93.28) by CY1PR0301MB1227.namprd03.prod.outlook.com (10.161.212.149) with Microsoft SMTP Server (TLS) id 15.1.466.19; Fri, 15 Apr 2016 17:37:36 +0000 Received: from BY2FFO11FD020.protection.gbl (10.255.93.4) by BY2PR03CA011.outlook.office365.com (10.255.93.28) with Microsoft SMTP Server (TLS) id 15.1.453.26 via Frontend Transport; Fri, 15 Apr 2016 17:37:36 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; gmail.com; dkim=none (message not signed) header.d=none; gmail.com; dmarc=none action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BY2FFO11FD020.mail.protection.outlook.com (10.1.14.137) with Microsoft SMTP Server (TLS) id 15.1.453.6 via Frontend Transport; Fri, 15 Apr 2016 17:37:35 +0000 Received: from shlinux2.ap.freescale.net (shlinux2.ap.freescale.net [10.192.224.44]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id u3FHb2HL019919; Fri, 15 Apr 2016 10:37:33 -0700 From: Dong Aisheng To: CC: , , , , , , , Subject: [PATCH 10/23] mmc: core: disable auto retune during card detection process Date: Sat, 16 Apr 2016 01:29:34 +0800 Message-ID: <1460741387-23815-11-git-send-email-aisheng.dong@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1460741387-23815-1-git-send-email-aisheng.dong@nxp.com> References: <1460741387-23815-1-git-send-email-aisheng.dong@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131052154561376293; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(50226001)(5003940100001)(104016004)(77096005)(2906002)(11100500001)(36756003)(6806005)(81166005)(85426001)(33646002)(50986999)(76176999)(1096002)(1220700001)(4326007)(586003)(92566002)(5008740100001)(2950100001)(110136002)(48376002)(189998001)(50466002)(19580395003)(19580405001)(229853001)(2351001)(47776003)(86362001)(105606002)(106466001)(87936001)(3714002)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0301MB1227; H:az84smr01.freescale.net; FPR:; SPF:Fail; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD020; 1:AaNUc1ApqPOH/nWPvw4hVi6KeAya38F4BPr6eaP1Tv8z6Ujifj5hYZ5zrKIH3XoQ1vF0gTgoLcgZZCmSnOqegHaIjOF2MQQAKAszwIq3XiiQPMI6XaLHTM00U0CZyUBHmU5HnkdLCpBwlDUL9w8aT2tfSOG3xXkY7A2U8usS56GqxtSiHPnmWMmuRSX7Jte6z4WVi2pBK8YBviYxNBUIaXkyAOPLe0IP11qjY/a2cpji25QxDs+yJpf2fQAMmJt4gWvbIHJ1xG8LTBUjBU7KSn59fbHZMS2dKa9ivdX408i613rRMmTL59Hsy8YBPQno5oOOvt902Gx0/758G88Jr5jVtKDXrcWDK9dv8rXwA5nfUbbs40IWZKt/diwBZXi2bStwb5REDKxu45p2ypuh17vpR/ALFloIjsgCd+Ep6tjCcSO8lEDmbKkgSFbJHdV5e/xrJY5BvQoyFQRv2m3iSlZg+TI5E31v5lnMyZEmBaP+dFBVY84q4A/GLN6Qlv4llGkbjLBAJzBogdgwXr/Zd9CTMHVn0IIZa9hzdd+R2DqrCqY678Znorfx7zSCoY6JTwAWbf23X8Ku1yLwZ5zdGfwhlIFTRqNCrtmTzxiC/eqxTImI0ifUfuXSZkdI3iwG MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 7c524d37-40b9-4684-251d-08d36554a212 X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1227; 2:QGRgPDGPMNnKDkxbLHa10Lfacqxv956wF/aHUWgNOnMu2gtnn6xp+hj6MFqiks+mChVtKXwToaRaWiY8I6BF2x0K4TIHnMNAROsJtsSLVazRKEBgzFhPSl7uwv50F8bawZHLRdh4JpEvCWNQkImFAdvwXaTNMDtn/sShewCtf8gQEbDfN+hL7hN/3Avk2GvX; 3:gpxZDORxi4FkMFmCzSfnoG7MIppOhATxSs+KqK0b1+iH0ztLvVbTmwxcZe0smxyVKVyWTprLO4rNNMkn+OthtRsDD7jRc/acozE6erbLT15BlARViI2ozw3X+9nNFzfwG9Tg+9pjATMRDdPve+UWX99FTWtkFOP4DiBPox5cjA7JpA+s0ZYghD4TxV2GghCt8Hi9LaKxY0FxsBt3CNbPK4V2kUJMG8Ax8GkXOiKuGdY= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0301MB1227; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1227; 25:aupXg0KiSjEF0Zd0K+LyDwqj3a5iPyoIJEuPGJ/Mm4i+YiCMkoiRS1QH6TLeH456w4wEwzXI3bgKzvj1Jz8fBPRtVF8K7ZiZJzRL1qLQ1h68Cha1t1kkM9SjiJL9ku1y3/hoA4xSEou2dMs7SJdi1lhJdGv3NteJwT1MYOLy8jXBXfouMJFh7BGOknuYv0HWrLShVfAA/8tb5h2HlibDz9Mnw2og1r9fiSs66If0vcbXCN/e8PCqUSioO2/25osDmM5hgADj9iPv6GUcGjFdrkeFcGRy3xTtR5GIVk70jnBlZaks3P7IRRhwWOJoG80uA+sHIeE57S5vz4fmTClQfJuDqpM8kgSGgN4cforEC5Ii3PrhqEoOcJfCPzH6jvQgeV7NQzzsvyBPjLg7EQLP5KLUXV0ptAoHkPGeOM3DfkRYNBmKXNHl3uq2HpmqUGc/hAOfRv0GRCb/+TSXNlgTRnBN+XUB+zO7wcJWeKSH34+CDLr6YptToY+qJXWy30pUzbEUyuqfnRjm7SwWjK59ZA+edXOInTMZC85hhf6rhNt2CGeeJaHbZJB4CEpog+i5W1Xx6E6c8795USxkqZHPUekw4BoK1j58g14t3c05jBCKQe3cJPDOJawFyptsHVNii0/jhMKe9rwfsCp1orto2g+9NmMvRchRrMiYLAHza6Y= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(13015025)(13024025)(13023025)(13017025)(13018025)(8121501046)(10201501046)(3002001)(6055026); SRVR:CY1PR0301MB1227; BCL:0; PCL:0; RULEID:(400006); SRVR:CY1PR0301MB1227; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1227; 4:RsVG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il0A==; 24:Gz/JepIi0gQf43P1jBKxqoAM3hOoX4WOLqYQqXGuB3xVfa6d9G0O1p5nzDmM2zsj6duB5m6CFNMfzYkpQlqGX5JxOIsQ6SdQRm89+wo+81M=; 7:Q2xJ8kbSnR3AZncReZU1NhFHI8EwsZnSBT0EYGIISD4My3iYeNqZBlfVTuigyU1bXuDIlrfdMc3M0eexPr++cXvv+DzLoTBSxfTk6/7U5SY/Lh2M1RCrubiOhJRtwgd+3+HrzaaLY30ZJJL3aWpwgiJU2ao0zX8QmqqRF9mQxAYxUR7RrrZbVNw/M99KEByPwzEyXdIY5YGTM5bFTZswaRMWgzul9aCvgv8VM+Q0w6Y= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2016 17:37:35.8724 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0301MB1227 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP During card detection process, mmc core may sends commands to detect if card is still exist in mmc_rescan for removable card which may trigger mmc retuning process after a bit time of runtime pm suspend. Obviously this retuning process is meaningless for card remove case, so we disable mmc_retune in mmc_detect_change() for it. For card insert case, the mmc_retune will be enabled normally in its card initialization process later in mmc_execute_tuning(). So disable it at first has no side effection. CC: stable Signed-off-by: Dong Aisheng --- drivers/mmc/core/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 52bfaf0..76d0802 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -1888,6 +1888,7 @@ static void _mmc_detect_change(struct mmc_host *host, unsigned long delay, pm_wakeup_event(mmc_dev(host), 5000); host->detect_change = 1; + mmc_retune_disable(host); mmc_schedule_delayed_work(&host->detect, delay); }