Received: by 10.223.185.116 with SMTP id b49csp1020906wrg; Wed, 21 Feb 2018 10:41:52 -0800 (PST) X-Google-Smtp-Source: AH8x225ksqEAdLZcFeAJ6xn/wUZjgboTEHdkRLQo5m+TUODY466IcmeEnqPHD8wqPjBLUtBV7SkL X-Received: by 2002:a17:902:2b84:: with SMTP id l4-v6mr4017988plb.338.1519238512265; Wed, 21 Feb 2018 10:41:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519238512; cv=none; d=google.com; s=arc-20160816; b=PFM2uu8wiLnGBwLQxAMRxBZbry8z8m+/WacacPkxuID58BKk4vRhyDX8cAPhUZXrxW miHfrLyELB9OaCk/zz+zEZgk7eruYXjS7CN/I2riHPiE9mNFoKF5SbW53AcquA9nBY9l Erjzdcccbx5hjXiyzGe+4sGM9uvPH75FTjz0hHZM3z+9dP1guCRKsQ7VNzsYFtdLO2wE KAskpc32Jey3zzlyDK62u62OkGzibXeA79ccCDWLSZgLgKrMjwsC0hewSnsr4D9Mhln0 DKKnjoUYCCGKRa7U03LsaArohTjWb1l27+SOCm59jydKdKEotiaSlJWlQWI1+WIL8jLS G5zA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=6vST7jAqXGPGwJo59S27vi2pKzn/4V2+Yneh+zxrTT0=; b=wO1ZK7L0B4Hn1/hHhbnZ2WlH07eTir1Oc1pS3ngTYDkvkvyOjR5AyiSsQ/h4oKxkFx m3M5L0SPD/l9rTfeAL3zb+fvyYum+Ri2NvtLw42+Q6w3VclTVCZQYmtCUmjfPY+OT62k dUjfPVniZQb8DKIK2X4OvmVHeX2jAwRIJieiKEA7ydXXPkgcPZtkHnlaw0fqGwRjvh49 /REdviSyM43uy38PKTIs/N3m1ULIBlAZGDJZ8DyQb1PpsnZcveFCn7mENGUkE2/hvhm7 ct3GDj6vPQ60PbxbbGOTJFzPrJo/A19YwBq4QNdPcacoHSwwOMi5AhOIMoGgN9vt6oB3 yv2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VbVjX1SM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h3-v6si15114plb.725.2018.02.21.10.41.37; Wed, 21 Feb 2018 10:41:52 -0800 (PST) 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=@linaro.org header.s=google header.b=VbVjX1SM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936573AbeBUNVM (ORCPT + 99 others); Wed, 21 Feb 2018 08:21:12 -0500 Received: from mail-lf0-f67.google.com ([209.85.215.67]:35214 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754037AbeBUNVK (ORCPT ); Wed, 21 Feb 2018 08:21:10 -0500 Received: by mail-lf0-f67.google.com with SMTP id 70so2318970lfw.2 for ; Wed, 21 Feb 2018 05:21:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=6vST7jAqXGPGwJo59S27vi2pKzn/4V2+Yneh+zxrTT0=; b=VbVjX1SMDeU/xpNv9GVNZ5pWmdTbIgBx0l+M504Eaks61rvEPnxRPyjfWKcZ7NzIZ4 HEUrM2XIGBe/brn8YIJIUMlgP/X990BMhz8cQC9Yqz00OYkBRszAqQ+n8qXiYibVfZQh gGtO9FiatkwsTCA6aB1KNw/FUXa/C6SUNibkc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=6vST7jAqXGPGwJo59S27vi2pKzn/4V2+Yneh+zxrTT0=; b=PA3KMHkXNA5y3eT6UBEmPD3jE09nvjEW0cOc1rUHH8z2k64JIBOzkkAdkJyOAACNO9 07Q/itvEeobmLZ/Ihrsc7FiiG3q6d6bUilnSUfAZxysooJVb/butUIVEjzRKq9Dq20tY adPsJSLyOD7TjNZvkO/q3BDgIstbXzmJnU71K+4VLB2eOgSlIkQGcMpAPgE3ud8wypMU 753rydED1Kay3qEoARCmpRwz3BE3PZSx1EmVEuzCEabDqIBVq+bmY27d2ksJFUz8iI3u QUQrbCh3tT9Ozk3YCzoA2fveiz1J+KlETCYs3SZ6p2Q+b5q/3vqcMW5zCxOIML8yu3BS DT5A== X-Gm-Message-State: APf1xPDqKodM3wJdFr55We7b0O+sy/TCvao08CkJYvHu69q5XYtcbhfy TmbT3YEIORGm7PfSVp1J33dX45k7CNzi4V671uwXZA== X-Received: by 10.25.100.21 with SMTP id y21mr2543310lfb.135.1519219268210; Wed, 21 Feb 2018 05:21:08 -0800 (PST) MIME-Version: 1.0 Received: by 10.25.20.88 with HTTP; Wed, 21 Feb 2018 05:21:07 -0800 (PST) In-Reply-To: <20180221124435.417056678@linuxfoundation.org> References: <20180221124432.172390020@linuxfoundation.org> <20180221124435.417056678@linuxfoundation.org> From: Naresh Kamboju Date: Wed, 21 Feb 2018 18:51:07 +0530 Message-ID: Subject: Re: [PATCH 4.9 77/77] mmc: sdhci-of-esdhc: fix the mmc error after sleep on ls1046ardb To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, linux- stable , "yinbo.zhu" , Yangbo Lu , Adrian Hunter , Ulf Hansson , Rasmus Villemoes , Arnd Bergmann Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21 February 2018 at 18:19, Greg Kroah-Hartman wrote: > 4.9-stable review patch. If anyone has any objections, please let me know. > > ------------------ > > From: yinbo.zhu > > commit f2bc600008bd6f7f5d0b6b56238d14f95cd454d2 upstream. > > When system wakes up from sleep on ls1046ardb, the SD operation fails > with mmc error messages since ESDHC_TB_EN bit couldn't be cleaned by > eSDHC_SYSCTL[RSTA]. It's proper to clean this bit in esdhc_reset() > rather than in probe. > > Signed-off-by: yinbo.zhu > Acked-by: Yangbo Lu > Acked-by: Adrian Hunter > Signed-off-by: Ulf Hansson > Cc: Rasmus Villemoes > Signed-off-by: Greg Kroah-Hartman > > --- > drivers/mmc/host/sdhci-of-esdhc.c | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > > --- a/drivers/mmc/host/sdhci-of-esdhc.c > +++ b/drivers/mmc/host/sdhci-of-esdhc.c > @@ -489,10 +489,18 @@ static void esdhc_pltfm_set_bus_width(st > > static void esdhc_reset(struct sdhci_host *host, u8 mask) > { > + u32 val; > + > sdhci_reset(host, mask); > > sdhci_writel(host, host->ier, SDHCI_INT_ENABLE); > sdhci_writel(host, host->ier, SDHCI_SIGNAL_ENABLE); > + > + if (mask & SDHCI_RESET_ALL) { > + val = sdhci_readl(host, ESDHC_TBCTL); > + val &= ~ESDHC_TB_EN; > + sdhci_writel(host, val, ESDHC_TBCTL); > + } > } > > #ifdef CONFIG_PM_SLEEP > @@ -584,10 +592,6 @@ static void esdhc_init(struct platform_d > pltfm_host = sdhci_priv(host); > esdhc = sdhci_pltfm_priv(pltfm_host); > > - val = sdhci_readl(host, ESDHC_TBCTL); > - val &= ~ESDHC_TB_EN; > - sdhci_writel(host, val, ESDHC_TBCTL); > - > host_ver = sdhci_readw(host, SDHCI_HOST_VERSION); > esdhc->vendor_ver = (host_ver & SDHCI_VENDOR_VER_MASK) >> > SDHCI_VENDOR_VER_SHIFT; > > Found build failure on 4.9 Please take a look CC net/sunrpc/svcauth.o drivers/mmc/host/sdhci-of-esdhc.c: In function 'esdhc_reset': drivers/mmc/host/sdhci-of-esdhc.c:500:27: error: 'ESDHC_TBCTL' undeclared (first use in this function) val = sdhci_readl(host, ESDHC_TBCTL); ^~~~~~~~~~~ drivers/mmc/host/sdhci-of-esdhc.c:500:27: note: each undeclared identifier is reported only once for each function it appears in drivers/mmc/host/sdhci-of-esdhc.c:501:11: error: 'ESDHC_TB_EN' undeclared (first use in this function) val &= ~ESDHC_TB_EN; ^~~~~~~~~~~ scripts/Makefile.build:293: recipe for target 'drivers/mmc/host/sdhci-of-esdhc.o' failed make[5]: *** [drivers/mmc/host/sdhci-of-esdhc.o] Error 1 make[5]: *** Waiting for unfinished jobs.... CC net/sunrpc/svcauth_unix.o CC drivers/pci/host-bridge.o CC net/sunrpc/addr.o CC net/compat.o CC drivers/net/ethernet/hisilicon/hns/hns_dsaf_xgmac.o scripts/Makefile.build:544: recipe for target 'drivers/mmc/host' failed make[4]: *** [drivers/mmc/host] Error 2 scripts/Makefile.build:544: recipe for target 'drivers/mmc' failed make[3]: *** [drivers/mmc] Error 2 make[3]: *** Waiting for unfinished jobs.... - Naresh