From patchwork Fri Mar 22 15:44:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 160932 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp962273jan; Fri, 22 Mar 2019 08:48:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqxxfaTMsYsaSwknOdVNEzsdrlfDoShj4YuinlivAYQNbGxj3K9zecKL4oiPrWgdxo1D8yag X-Received: by 2002:a63:ff66:: with SMTP id s38mr6057561pgk.120.1553269688072; Fri, 22 Mar 2019 08:48:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553269688; cv=none; d=google.com; s=arc-20160816; b=EgYdwDmBEzamp3YedTHDsCM/Z4SVDnOXautbmiZ4yIRPp/zfnLdwiJvLpnhLH+ar4P m3HBPcmrMmL7SbXgmSgXDrHBLhqgV6iaCJt0CCfROEt0UCvMCpbKGE+awrTajO2ubnUo mq90xBYKF6denbdTkfKvA13i7guFYbGm/v8oX58RGcTgxGD+lxrQy3D1LtXY94bgE+wC 8UYM1Gx3Y6i1fHAD8+cBFIHPizd3j7tBkM+JOt0PjGqpk89EgSyxcPIF6bYe9hDeYz9Y F7zlAR9cCt1DRiWTtoEyJY3QnumPC4nwgEKhq99hS+mPs66dNQ2F0NQF1f0sfFQwrlae KEIw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=35jJ8QJ0KYtnjLVnmgCWGNu8LQrNXJirUg2eAZrXvPk=; b=KSFWbNt3YaeHlm+4FbVk6Ja2IGlcI82MJVeg95po8pv0YlQ2JiqrvOoJbQ3NXOzSQr wc8SO01WMIXn6jUlwXHPu6Gjhke9MyWbo+VRAYRFEf6AiLC0b9T5NHECRrst4Rfr471B 5+O/hlT3OK8hTWXHH28MWkLUg59wcz2fLDoR1EJGkDczeD9HFWwMV9rKmNbjV+BMHTNd sPjCBNMD847PuLtXvzhW5UuTD9/q3kn3qaOR5m0DsZZBDtpRwGmVro6BVNu48MRZC2H9 iPMgsmEZZENDytr/m2xBxADdKXENuiXdl11aczfcir82xplMxbCvPUBW8DJD51pdNuhS ut5g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-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 t7si6783572pfh.78.2019.03.22.08.48.07; Fri, 22 Mar 2019 08:48:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728480AbfCVPsH (ORCPT + 5 others); Fri, 22 Mar 2019 11:48:07 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:58217 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727473AbfCVPsG (ORCPT ); Fri, 22 Mar 2019 11:48:06 -0400 Received: from wuerfel.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1M1Hi8-1hA7He3ZN4-002mWu; Fri, 22 Mar 2019 16:47:53 +0100 From: Arnd Bergmann To: stable@vger.kernel.org, Ulf Hansson , Shawn Lin , Avri Altman , Ritesh Harjani , Jiong Wu , Martin Hicks Cc: Ziyuan Xu , Arnd Bergmann , Wolfram Sang , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [BACKPORT 4.4.y 17/25] mmc: core: don't try to switch block size for dual rate mode Date: Fri, 22 Mar 2019 16:44:08 +0100 Message-Id: <20190322154425.3852517-18-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190322154425.3852517-1-arnd@arndb.de> References: <20190322154425.3852517-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:Up6hvE5bt3o/vSsgJuCZN3OfmzkMDswwd0o14/Q/eUjurBBO/3c 78coqjWfdKnwPvALN2Mji5pfrU/Em0bTpvUCoi2FruCjQ+Iw5ZdNO/pgLgV0aDbjTMdR0Gc fx+0xasgAsErwZbxrSAtheeXGGT417xtCLpe5Fc5wUIh+fRHn0XwDVkiub50tST2TR5+4QT 3+MnUuZfPuzxoviPfPHUg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:V6unOQIF1tY=:VNjvKIu+JKJD9f+Z+tIja+ gACnTL9EtUPYw75NentheME7zykhMYM6y24ycmoU7fiefKLq7NB5A+y3apgwGmYwpULzG05cj zJuJogd0wF21L6Cc3LzvT0F1bQvP0Wu3OXhkD55r/HoUMempR1/ASxVLzT76JacW5+/Sr/Mqk neJ1Xu/uzsA1FiGc/xlOcZB7/LpglNzRvNT3GjaGSo4TmIlYwim5XZeYhn+7fBGjc6cRFaYg9 JQ2UgnHZbzs/PfdXzJlo3m1SnT3aJBMegI2iUCPto0ES7aLceQEIQoWLNc4CrN6TvQCX3d8x/ hU+2gW02c+qsVgsFIO7vJf5oJ4wYfIlJFnZHS7dPZZgzOpSwFOeGeU6XuDF5S9U+7C2Ng+KwV f4u6co97xlqYnTxAP0Z59EogvveqwTjlIYhc2yVJqI5QFCydAM/PTX9uf2ycmZFUbDT/e1ZoQ +Jdh9+5cvEK2jaHyZ/F+Rz7ARp3dTQdTnByhJzlG0DstWvl9zKXi/Tq6nRkFJWyubT4ZKNaRQ My4VezSTZLcWNGraXn73YRQ1uKvoWAWGwkpSu5p1Bj4kTHhIW3QV0LVTUQXhIU9Qq+SgRCo3g ZmfoQ/85aKTuEgVCNk5Bay6/CyECP6ISU0dxp5Rvxxt6ZVo5pW5+NaXE1PWQJyn5Cjdynvp+3 xr+y/J6t1kt4kCoD3ya76l/xCUE+6rVAO2J0AOEuviRsW8cHpgyHp8Oj4qr1fQS0lClQTy1DG CF5k1oywOG2pGy2dTGgkqV/iNR0zCP9Q7dhnrQ== Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org From: Ziyuan Xu Per spec, block size should always be 512 bytes for dual rate mode, so any attempts to switch the block size under dual rate mode should be neglected. Signed-off-by: Ziyuan Xu Signed-off-by: Shawn Lin Signed-off-by: Ulf Hansson (cherry picked from commit 1712c9373f98ae8ed41599a8d7841a6fba29c264) Signed-off-by: Arnd Bergmann --- drivers/mmc/core/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.20.0 diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index df074f8c7cb7..3e17268b9994 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -2406,7 +2406,8 @@ int mmc_set_blocklen(struct mmc_card *card, unsigned int blocklen) { struct mmc_command cmd = {0}; - if (mmc_card_blockaddr(card) || mmc_card_ddr52(card)) + if (mmc_card_blockaddr(card) || mmc_card_ddr52(card) || + mmc_card_hs400(card) || mmc_card_hs400es(card)) return 0; cmd.opcode = MMC_SET_BLOCKLEN;