Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp839177ybi; Fri, 12 Jul 2019 05:30:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqz+pIjgtuXNGyVZWVCuz8gR02lkNr9ukZM7SE7pldvl+dBKM3RtRPHVwQAhnUYzpniav/3b X-Received: by 2002:a65:6081:: with SMTP id t1mr10728503pgu.9.1562934640427; Fri, 12 Jul 2019 05:30:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562934640; cv=none; d=google.com; s=arc-20160816; b=1CLUvYcKH/Z4aUhW6rRNPRlRSQ1gCAmZDjDEbV96KL6CviiBrrIce3Ff1HYFwurrH1 DJFIKaRnqygoShA7y6iyrZeExdA6+EUZExRWeJpuzDjQ/oBSwHcold7UBs99Zcse7XWO nKvSvCgWQa+eOBq7zxF8bYfbpkOYZOL1I3K7fnNWAXdVWKJdJNAr1Y0pSwjXOkf/8OaN OgVeg+EhC0NcDoODpIPG4F0Si2w3IfoYtWZGIM+4xTX8Bm4NJdobgZPcm9JGxW6rOYp5 tDkDrKidQahHFC5fGtWJXiXq61O7gpFVPg9olOaaP3BGvkTnaqlnHM6xYPJ5SoOiLWgX WicA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=oNhAUXnwb3j7QF0IUORW41t4h1d9uZf5JqOui4DmgBk=; b=RITBeQcnP/kInhHgNrQU29isQsq6PU3U1uNqlkl04rMULlsvSl9sBbBG7GAKcAabtU OMaQFvpzw8EQ2ET5r8xetfSa6gk7vGrslgbuU14f/jdQf6oe6z15gICAmAj5q1LCLiKc /rPT3kYbNWV/e0pDGVD75bhvGXcR5LYaYUAesMPWK19fF3AzdXFAxruZr6wBH4FN/Vxr alIy/uiHCd8Xtaz/h06+/4qYjoHMARVlVzuWhmXL/g4eRE9msHogVldZEan56WIoCapZ tvDEN+dEvTkDEbojbbJhHM2uqJMWV4Ogc6BQl/jc3VtHz7CdbThRJkZVvDdGb900uetT SK2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=I26YZ8U9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m12si8303165pfa.81.2019.07.12.05.30.24; Fri, 12 Jul 2019 05:30:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=I26YZ8U9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728778AbfGLM2Q (ORCPT + 99 others); Fri, 12 Jul 2019 08:28:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:41834 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728775AbfGLM2P (ORCPT ); Fri, 12 Jul 2019 08:28:15 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7D1E22084B; Fri, 12 Jul 2019 12:28:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562934494; bh=FD9t5F8PGi371TcVdek1ysKVoWqC0ABFqzPsaC7jCPE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I26YZ8U96Nno0Q2A2zcQjMe0vYMC19OxeYpPGlQ6qdp7RQR6ooTzBptgFbHAe0ES0 K2M7vtcRr4qYcIYo8CxU815qvZhWGcKDqZ3TcPtAPGlUpnxmKY7/dPrqEkWVrTr2uu DUFGyhPAQEaMdiO36Te3QKiKRXUI+tsAvsQOxsWI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yoshihiro Shimoda , Wolfram Sang , Ulf Hansson , Sasha Levin Subject: [PATCH 5.1 071/138] mmc: core: complete HS400 before checking status Date: Fri, 12 Jul 2019 14:18:55 +0200 Message-Id: <20190712121631.401754036@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190712121628.731888964@linuxfoundation.org> References: <20190712121628.731888964@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit b0e370b95a3b231d0fb5d1958cce85ef57196fe6 ] We don't have a reproducible error case, yet our BSP team suggested that the mmc_switch_status() command in mmc_select_hs400() should come after the callback into the driver completing HS400 setup. It makes sense to me because we want the status of a fully setup HS400, so it will increase the reliability of the mmc_switch_status() command. Reported-by: Yoshihiro Shimoda Signed-off-by: Wolfram Sang Fixes: ba6c7ac3a2f4 ("mmc: core: more fine-grained hooks for HS400 tuning") Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin --- drivers/mmc/core/mmc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 3e786ba204c3..671bfcceea6a 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -1212,13 +1212,13 @@ static int mmc_select_hs400(struct mmc_card *card) mmc_set_timing(host, MMC_TIMING_MMC_HS400); mmc_set_bus_speed(card); + if (host->ops->hs400_complete) + host->ops->hs400_complete(host); + err = mmc_switch_status(card); if (err) goto out_err; - if (host->ops->hs400_complete) - host->ops->hs400_complete(host); - return 0; out_err: -- 2.20.1