Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp831749ybi; Fri, 12 Jul 2019 05:23:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqyMgcNglW1zXpFbxLsiJLNXYAbrhPDXTDmmB4ab0T0rvezbp8gN0OSln/60DLRRlwQvA7ez X-Received: by 2002:a65:404d:: with SMTP id h13mr10334712pgp.71.1562934194592; Fri, 12 Jul 2019 05:23:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562934194; cv=none; d=google.com; s=arc-20160816; b=eosUS1g5p3bWI6cykLQPL5SexUkgzxA2Ezh5mQWQjDFgfubtyBTNw+c9cRQ09ixPqa wewZ+VdI4LSG+k+A0SiwTmM9NFcilZG//YjU96MZ4sJD+LNdeID5pRhjUPTKN3eIMmjB 3a3B6ugFN/c3UcugKf55zq5BtdT2fUETzi2TBerTlnwgKkxE9EWnwoNXMrKk1JI6g4xi zlnAgLciEJvxHOypp2V891oMVP64Xf0xUZWasJEqoJpKF2r4LMqJK9BddNqC7RGXtrRO 74OGO9t4TSKXp9GR1yL1oVD+ArALKmgilWOm/MBlNpEdW02GE+k+MkJmYsflg5zmE5+1 UdNQ== 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=Tu7I31sGKxa0KGYLjJhaRgjYI0UUpO0uGEIgikCEVtc=; b=NsSEgXP2ZlxMI8BpHlTiKyazPO5x1eH4znlKwaw9Iss2CJ7KjW72UsrzxWyR0RoBwc yYNF4gD+qgktxEa/pTBQBtNX1OpFUlwuEM3N8sN7CMtB2E5c2OL7ckdRuxL7EvsSUqsG sTAucA8AnEr0qxMTcZB3vgQps9iLWy9XG/kkYbTEbxGdPdOeU0MBTtnT7wWhuWFiFcHc HkR2Y+UE3UlVGc4PnVCBPkYbTFaij80eIpKPTKlKHfQyJDvy6XPF8HAOUv8CILSKI/hQ wy6oGbyhW1HBJOfsiTWyPLqp4P7m6cHeBaMEEGMQ/plbjuiixPnlJWEZ8jhMCBtvs2jB XrLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WSG+UQNj; 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 r140si8239497pfc.27.2019.07.12.05.22.59; Fri, 12 Jul 2019 05:23:14 -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=WSG+UQNj; 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 S1727716AbfGLMWC (ORCPT + 99 others); Fri, 12 Jul 2019 08:22:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:56486 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727268AbfGLMV6 (ORCPT ); Fri, 12 Jul 2019 08:21:58 -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 60163216E3; Fri, 12 Jul 2019 12:21:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562934117; bh=qp2QdYXM+NBo8M8cyO+n/PU1Mq/At1HHVJtHKxe6KoQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WSG+UQNjMYArPZ0MD4SFCCdGyJb/w0L1rzQJ/pVXJTD+Z3h4kJbTMdAxFJ6U6//AJ 3J8KlUAxC/g89bJo6/PJemO/iYdGYDUwJS2V6893OzAfwE04F/DboXy/4iYpL+cDlU tkyfSf0nwZaPGFSYPwccgNFdf/okErxXfLeCa0Ic= 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 4.19 45/91] mmc: core: complete HS400 before checking status Date: Fri, 12 Jul 2019 14:18:48 +0200 Message-Id: <20190712121623.964532029@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190712121621.422224300@linuxfoundation.org> References: <20190712121621.422224300@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 55997cf84b39..f1fe446eee66 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -1209,13 +1209,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