From patchwork Fri Aug 21 08:16:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 11728597 X-Patchwork-Delegate: geert@linux-m68k.org 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 2CAC8739 for ; Fri, 21 Aug 2020 08:17:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6A9FB2078D for ; Fri, 21 Aug 2020 08:17:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="Fj+Ksulr" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728020AbgHUIRA (ORCPT ); Fri, 21 Aug 2020 04:17:00 -0400 Received: from www.zeus03.de ([194.117.254.33]:37036 "EHLO mail.zeus03.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726239AbgHUIQ7 (ORCPT ); Fri, 21 Aug 2020 04:16:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=sang-engineering.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=k1; bh=goFjW29c4qAtiC9urPtHEqFBkLU 1WnIEHmuGrVQA9MY=; b=Fj+KsulrkriHtAV5q8wwYnvLMvlsArBpLZ3LNJMEdHt TNVSAM+P3NVka9O2ZvJBz5nLWLs26M7emOQSKxw9UX8xDgQB2Q9c48KKoBIvH2NF ptqyhZ5j3xEUn1HodPYkUmnDPIxwR5X38SVDtL7AMDzyELM1Vdk3KWkyO8IlcQkw = Received: (qmail 798577 invoked from network); 21 Aug 2020 10:16:56 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 21 Aug 2020 10:16:56 +0200 X-UD-Smtp-Session: l3s3148p1@7h803F6tlqogAwDPXweWAG48P/WlTOIM From: Wolfram Sang To: linux-mmc@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Yoshihiro Shimoda , Wolfram Sang Subject: [RFT] mmc: tmio: reset device on timeout, too Date: Fri, 21 Aug 2020 10:16:54 +0200 Message-Id: <20200821081654.28280-1-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org When a command response times out, the TMIO driver has been resetting the controller ever since. However, this means some initialization like bus width or tuning settings will be forgotten. To ensure proper working in all code paths, we will enforce a reset of the remote device, too. Many thanks to the Renesas BSP team for the detailed description of the problem. Reported-by: Yoshihiro Shimoda Signed-off-by: Wolfram Sang Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda --- This patch depends on the TMIO reset refactorization: [RFT 0/6] mmc: refactor reset callbacks Looking also for tests here. Thanks! drivers/mmc/host/tmio_mmc_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c index ab910043808f..0d64308c619f 100644 --- a/drivers/mmc/host/tmio_mmc_core.c +++ b/drivers/mmc/host/tmio_mmc_core.c @@ -220,6 +220,7 @@ static void tmio_mmc_reset_work(struct work_struct *work) spin_unlock_irqrestore(&host->lock, flags); tmio_mmc_reset(host); + mmc_hw_reset(host->mmc); /* Ready for new calls */ host->mrq = NULL;