Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6611C43381 for ; Sun, 24 Mar 2019 19:53:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 738C82133F for ; Sun, 24 Mar 2019 19:53:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553457213; bh=eoLDGYuqcbkQXHWqlgCfgZ9t6q63m31D0kQL3YUh/Pw=; h=Subject:To:Cc:From:Date:List-ID:From; b=DYsQKQixnllX65Jaw94nY5SGKVeYAPwHcOMeQAWOXc/LkNxcpfEyaEKTTVjnlRFXq 5cz3RI6HwJHnWx4ZRFnvEs+xRncFL62oXaqu3tN0m505V8lbdg2nryI7k2nhdMe6EC JQuSXvtunLiSTce7p1Ov8bo2gxHfn9TYi85K1fKQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727137AbfCXTxd (ORCPT ); Sun, 24 Mar 2019 15:53:33 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:43889 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726139AbfCXTxc (ORCPT ); Sun, 24 Mar 2019 15:53:32 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id D389020F20; Sun, 24 Mar 2019 15:53:31 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sun, 24 Mar 2019 15:53:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=8+Bs0M UqsUW+YDBDA40+a2UtGgW9TflCsQfpRfYz24s=; b=vvxlTxk/PLXl7ipj+ViVp1 EIpRS+VbrZNOPlT1vWRVqV46EWwD8j0Mk7J+lgaXooPAaqqFXug6o6jyiZAFd1+J wzVbqiQFNB7NVSkeoFsvX7WswT0SL3kIut/CBrQPnN+3vtKN1R6V4t3rfl6XbatM nFHbXcTxvkp53OSIPLFGZ7LQD/mVO5hQD0QOI4ldQMaPG8MB5r5QJvYCkGH9/fQh RE9GUXHmHTn6LbLY/EkS7ELH8DUvrNV96Ch//f7AgxNcFZ3YNRPe5NjAXAhEWvk0 XYqmXn2KKALORK0EGnokffj7vCZIzpsvOkSuxGetpfxv+vT2kGFojuWOZjUd1oZw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrjeeigddufeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvffhfffkgggtgfesthekredttd dtlfenucfhrhhomhepoehgrhgvghhkhheslhhinhhugihfohhunhgurghtihhonhdrohhr gheqnecukfhppeekkedruddvkedrkedtrddvudeinecurfgrrhgrmhepmhgrihhlfhhroh hmpehgrhgvgheskhhrohgrhhdrtghomhenucevlhhushhtvghrufhiiigvpedv X-ME-Proxy: Received: from localhost (unknown [88.128.80.216]) by mail.messagingengine.com (Postfix) with ESMTPA id AC507E44A3; Sun, 24 Mar 2019 15:53:28 -0400 (EDT) Subject: FAILED: patch "[PATCH] mmc: renesas_sdhi: limit block count to 16 bit for old" failed to apply to 4.14-stable tree To: wsa+renesas@sang-engineering.com, horms+renesas@verge.net.au, phong.hoang.wz@renesas.com, ulf.hansson@linaro.org, yoshihiro.shimoda.uh@renesas.com Cc: From: Date: Sun, 24 Mar 2019 20:30:56 +0100 Message-ID: <155345585697126@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 4.14-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ From c9a9497ccef205ed4ed2e247011382627876d831 Mon Sep 17 00:00:00 2001 From: Wolfram Sang Date: Tue, 19 Mar 2019 11:12:59 +0100 Subject: [PATCH] mmc: renesas_sdhi: limit block count to 16 bit for old revisions R-Car Gen2 has two different SDHI incarnations in the same chip. The older one does not support the recently introduced 32 bit register access to the block count register. Make sure we use this feature only after the first known version. Thanks to the Renesas Testing team for this bug report! Fixes: 5603731a15ef ("mmc: tmio: fix access width of Block Count Register") Reported-by: Yoshihiro Shimoda Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Tested-by: Phong Hoang Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c index 71e13844df6c..8742e27e4e8b 100644 --- a/drivers/mmc/host/renesas_sdhi_core.c +++ b/drivers/mmc/host/renesas_sdhi_core.c @@ -641,6 +641,7 @@ int renesas_sdhi_probe(struct platform_device *pdev, struct renesas_sdhi *priv; struct resource *res; int irq, ret, i; + u16 ver; of_data = of_device_get_match_data(&pdev->dev); @@ -773,12 +774,17 @@ int renesas_sdhi_probe(struct platform_device *pdev, if (ret) goto efree; + ver = sd_ctrl_read16(host, CTL_VERSION); + /* GEN2_SDR104 is first known SDHI to use 32bit block count */ + if (ver < SDHI_VER_GEN2_SDR104 && mmc_data->max_blk_count > U16_MAX) + mmc_data->max_blk_count = U16_MAX; + ret = tmio_mmc_host_probe(host); if (ret < 0) goto edisclk; /* One Gen2 SDHI incarnation does NOT have a CBSY bit */ - if (sd_ctrl_read16(host, CTL_VERSION) == SDHI_VER_GEN2_SDR50) + if (ver == SDHI_VER_GEN2_SDR50) mmc_data->flags &= ~TMIO_MMC_HAVE_CBSY; /* Enable tuning iff we have an SCC and a supported mode */