From patchwork Fri Mar 22 15:43:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 160917 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp959909jan; Fri, 22 Mar 2019 08:45:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqwsRsEVXxTAyeTz4mwRXvEfwPp6urYcSSAFx+L46D7MPyc0VnqzvBQv9p2fDL4bUdguYh/4 X-Received: by 2002:a63:84c7:: with SMTP id k190mr9555789pgd.255.1553269540169; Fri, 22 Mar 2019 08:45:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553269540; cv=none; d=google.com; s=arc-20160816; b=R/4AYuKNeFhwZ8X1d7y10+mhkRXccqCaOOTCrqFtx7/oNmb9R4IGUWjGwX8Ms2lNj0 BwUhwTyhhy5lZs+So6XpAeasrSgOjs49sCoGbhFkxV8S31ysiCnjqMZIsYVk5zv7tafw q3/4+TqCr401mQL66Y9Kr/UVb4I458cD7Ml+jLgyQxFd3ETRi8XE21VPboXmjVx7GGhD j58J8TM/Ts8pPXyeh8iDokTlM6f5SAwHd0OGt6N+wvbSEnLpaLPDHMmiaVxxWAXmQp// WXrYTnxYU7xO1Cy63dUicPk70tLFMcKh03uG83QBgM+mPJmSPrX0AxCvoL+swg3ckwTR KdEw== 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=7SfS1lu9X9xvbydoECY6+/B8CyrL5DX70kH/QK2qqy8=; b=RKOqGnLVTGr5TgB54kRRA4iTg9fT0STGawW3+4RPBGy/IueqShQ1MnexrNmcKMH/EQ qHTKvDXzs+ozLnxP9U0KJ+61v9sF4JoNceCo67HyQ9oAyJ1emjJwJGhG3Zf5HunCcu7s 9dbPDpIJvtNn4xbhVFYifXtsx/KB1CDuRr9eBqzUYolxtv02bgp23XcmwkTRAHJqpmPD obp4CuAdp0JcHxk64JThzgFuuLvlduNgfZ4YeBdGLe2VTHdgnTPNXgnPXa/3dqkHiUxE pe6QELd9PGZYrtW3dBvYFc1uOd53tSKiQpkA2n+EWqnzmFEoTROLtdlMNq6Oku8FJuY2 davA== 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 j9si6907231pgp.17.2019.03.22.08.45.39; Fri, 22 Mar 2019 08:45:40 -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 S1727567AbfCVPpj (ORCPT + 5 others); Fri, 22 Mar 2019 11:45:39 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:46287 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727566AbfCVPpi (ORCPT ); Fri, 22 Mar 2019 11:45:38 -0400 Received: from wuerfel.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1MIMT4-1hAiPn1nlM-00EKiE; Fri, 22 Mar 2019 16:45:31 +0100 From: Arnd Bergmann To: stable@vger.kernel.org, Ulf Hansson , Janusz Krzysztofik , Linus Walleij , Geert Uytterhoeven , "Tobin C. Harding" Cc: Martin Fuzzey , Tony Lindgren , Arnd Bergmann , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [BACKPORT 4.4.y 03/25] mmc: pwrseq_simple: Make reset-gpios optional to match doc Date: Fri, 22 Mar 2019 16:43:54 +0100 Message-Id: <20190322154425.3852517-4-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:pXc1FdV5baiz8nobVE1STGDw+yPyuO8D5aCB7/njBTG3bn2KmqX B54PkMpx2O48DEyo0oTsTQh2OqB99IvxhcqDqcLvpXZfvWcMbXb7DI02DPEHVMTHsR3zJAE C9EHBZBp/8tdh65r5gU1/Y/445Fw9vYXoq0ruLJnN8yeCxvQTazXKptL+lHAGGDfU2I1jOn mHrJNqxoVwc9g9fUUdmAg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:i9vy6Ber0Rw=:2FHa5XeVUadCz07UFhhK8Q N0/0jVYWsP57lD454t4yBp3B0pMSi49Qhk91shLAA0gYXRziF7WzAhFGZb8HRpnLhzNG4Cy+p EKK9kGmm++e9Okqii/UqYDRyl9vm0sKbxeqnmPnsdfT5czujW9EtFnxBIwJ20d/3Kr6sP9Oqz ejEcFBLcob/fe69f6SA7rpv3leb9mBpLXoIh/RPAtkMqVbnU6nBasI6dgLbHHM+K/NBk+HuCR E8jfZOCpMhzGG74+M1flAByPNFDF0PZA0F4mNOM2XbjXwn9YX1TWgu/5rTBVnkX8YYwTo96Yw E/oMPXjPgR4WPml1T1N/RmMq/mMTcYN2+N6iVLgeaN0vIJ2xxM1rSp4DuQ+RdJuGDSZwgkc9a 7uYaCoeJHIBUq8jHP4+l4t5pvLDeefD0MbhLW/A/aSR+xjy98khe4K9+kjQhsKZ4zebaQHxut i1HPbQ7bPD6NhpL4xGIRAlHLnzSsEZsX/dG/KtOh/r1ehU4E4LrrBV0Uy32Cn83jipe5kNwfG JlML2T7xhU9LFYSG28pYJxJskHtCjgaqNtp7QllVwgSC6tRjaaQ2MAYC3dXy1brfzTGR3GIbi 4MU/u9CVT3iJVKShy2+1D5xr6DRX3UU3or2zQO+K/eZQ0Cmdxi85UYebUTr59mnuTpY2TGDWA lg2xDtZxAWmh6bXSVxvzlALJBRO3lhFYTgAXkslDkiVvOIe0HEj1d31AWGsDSaR7bsb1pN/R8 e3Lu5RZUO9igX40C8mSYHLWqDsc4sR2Hk1eigw== Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org From: Martin Fuzzey The DT binding doc says reset-gpios is an optional property but the code currently bails out if it is omitted. This is a regression since it breaks previously working device trees. Fix it by restoring the original documented behaviour. Fixes: ce037275861e ("mmc: pwrseq_simple: use GPIO descriptors array API") Tested-by: Tony Lindgren Signed-off-by: Martin Fuzzey Signed-off-by: Ulf Hansson (cherry picked from commit 64a67d4762ce3ce4c9466eadd152d825fbf84967) Signed-off-by: Arnd Bergmann --- drivers/mmc/core/pwrseq_simple.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) -- 2.20.0 diff --git a/drivers/mmc/core/pwrseq_simple.c b/drivers/mmc/core/pwrseq_simple.c index 2b16263458af..aba786daebca 100644 --- a/drivers/mmc/core/pwrseq_simple.c +++ b/drivers/mmc/core/pwrseq_simple.c @@ -29,15 +29,18 @@ struct mmc_pwrseq_simple { static void mmc_pwrseq_simple_set_gpios_value(struct mmc_pwrseq_simple *pwrseq, int value) { - int i; struct gpio_descs *reset_gpios = pwrseq->reset_gpios; - int values[reset_gpios->ndescs]; - for (i = 0; i < reset_gpios->ndescs; i++) - values[i] = value; + if (!IS_ERR(reset_gpios)) { + int i; + int values[reset_gpios->ndescs]; - gpiod_set_array_value_cansleep(reset_gpios->ndescs, reset_gpios->desc, - values); + for (i = 0; i < reset_gpios->ndescs; i++) + values[i] = value; + + gpiod_set_array_value_cansleep( + reset_gpios->ndescs, reset_gpios->desc, values); + } } static void mmc_pwrseq_simple_pre_power_on(struct mmc_host *host) @@ -79,7 +82,8 @@ static void mmc_pwrseq_simple_free(struct mmc_host *host) struct mmc_pwrseq_simple *pwrseq = container_of(host->pwrseq, struct mmc_pwrseq_simple, pwrseq); - gpiod_put_array(pwrseq->reset_gpios); + if (!IS_ERR(pwrseq->reset_gpios)) + gpiod_put_array(pwrseq->reset_gpios); if (!IS_ERR(pwrseq->ext_clk)) clk_put(pwrseq->ext_clk); @@ -112,7 +116,9 @@ struct mmc_pwrseq *mmc_pwrseq_simple_alloc(struct mmc_host *host, } pwrseq->reset_gpios = gpiod_get_array(dev, "reset", GPIOD_OUT_HIGH); - if (IS_ERR(pwrseq->reset_gpios)) { + if (IS_ERR(pwrseq->reset_gpios) && + PTR_ERR(pwrseq->reset_gpios) != -ENOENT && + PTR_ERR(pwrseq->reset_gpios) != -ENOSYS) { ret = PTR_ERR(pwrseq->reset_gpios); goto clk_put; } From patchwork Fri Mar 22 15:43:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 160918 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp960341jan; Fri, 22 Mar 2019 08:46:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqzInPKugejn2LcVjHS2dLj8M9Pc/eRCPgFAaRe1BMkB5cSCNJ5fIT1gMz1TGROmnYJA4R60 X-Received: by 2002:a63:6e4c:: with SMTP id j73mr9826364pgc.276.1553269565663; Fri, 22 Mar 2019 08:46:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553269565; cv=none; d=google.com; s=arc-20160816; b=rWiMxZPCyS0OA7zoaPLNfJGrf3asHAd0DNNPUZ3RYXC/6sl+Q62Gm+8EcNj9ZzHcUC ZUxPPUPJw4MKq4s+B8E5IDqNrA5qERcWmg/JTVS4mg7aKiEWmhpoUI11VHkOnbA5x3qf Ng7v8p74FXVHAYGy39hsEvBcxj5xnCy3cmbVWGXs86b2Nx1BzW+qk83ZrXD+2cNJDwJ4 gzW+FMK7GgYFX4+KZXrp6R/FLnQ8RKAl8sDzE6vq9DOcGyJYQRDg7jcrs4zwpfGPMcaF Bd1HQFsJi7PZapTNtwsYd+rLVBaPqk+sf64us16By3XQHHRbmMbPIr7hyiewvT57Zm+/ 0dRQ== 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=7/ctW/yItTKgpMFEfod3AoJPalWYZip850rcRbHhKxg=; b=HrJLH6ZPJZxZ/9GGKr0KJEWjGi3DUNC6QYOyEoK9Ovr9X2a8Fj7ikqhJ4eqiYEVxly t88iR+jddSc4Jty0qRPC0ltb2xPP+/vgEH0cA6PayGWZvWgR/Dl19+x4b9BB+JLC2TIJ RxndkkdU0NLDwAgzig5FwQbIoKVenNl9rBBy4GMaCIIA9Xlp9D2D/sICsrAHaoSd8ZaD 926kK4vfJzSt5ux3uT7pxEIORYb5zrmWbVF1zZUJ2BfodwtEUxcFfZxPXV3EscKey0jD lRBTvXGDpz/LjZ54AATTBmyMB1eDQJxhZWMugTB1qNBCByjaDvA9vG3vilVh2AaKUB9r LKBw== 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 y18si6871294pgf.247.2019.03.22.08.46.05; Fri, 22 Mar 2019 08:46:05 -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 S1727550AbfCVPqE (ORCPT + 5 others); Fri, 22 Mar 2019 11:46:04 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:55939 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727244AbfCVPqE (ORCPT ); Fri, 22 Mar 2019 11:46:04 -0400 Received: from wuerfel.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1M89TB-1h3FUl0ZQx-005ERN; Fri, 22 Mar 2019 16:45:56 +0100 From: Arnd Bergmann To: stable@vger.kernel.org, Ulf Hansson Cc: Chuanxiao Dong , Yuan Juntao , Pawel Wodkowski , Arnd Bergmann , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [BACKPORT 4.4.y 05/25] mmc: debugfs: Add a restriction to mmc debugfs clock setting Date: Fri, 22 Mar 2019 16:43:56 +0100 Message-Id: <20190322154425.3852517-6-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:rNgMA6KuyisLXRfCfenSe1Wq9wIOuO34n904IfRUOVdG701BO8N BsWka5aFdovs3ew+Atu2vZWxg2WBWaFa1PfkL7gqK4/urtKXNZzjMx9p075htozU3cz4MKv FDXFRMP33vZohqA/5KGjaaY7zwUXCbtHbvArBIyuJz8TESWvwKg1hI3Y9EYIK7NlLkcV+kx xRhUoIfRl9jIlvCxXAU8g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:zFe/6JXOYhA=:acYPAqDC7pVn98rLvZMSES 4THsCAGfnVUZdV33tqRBRvFIdFNieDIkxhcrQQmTL0gXyMx6EH2BfZgj8Tg2/NqHFf6H3Pza4 MK31PMRC6MqlDc7CUs4xJb/10ChMv7QPJcTUORNK/WBxCTgD/o05lWUCkAbHIZzXBaRlCvkue 43jgkIU2E/aa44EpNzMUNO7FeUzKejJANjDiJYfj8IAR96i0XVy6hsUOVErbkS1cxJvf6c63f 8JIp321mrCl9VEDUC3mCZLKOhlnWnOeIR7Y+6vzwOh4zLVxUaiDnZNN/8MSlo6SUlxbpcPKWF RTLuMKwEWX31ao4qqHM1rbxVTcbUW9Ph9TW5rngLeVnO4netSEkBLP5Wx8Pa2zkeBetw7ItYu N770UisrdkNy06VMvXGwN9ijs/9ZONfFxkgy/MgxdWeKEERG9h436seFiUcBJeh2CxEqtB2pg 1iJ39mxln+0S/JO6NLFc2op1X9h0I0M+20Q+MacNGiErMRDTaEgKCoE1XlyflqJ2VWO/tmPJL jS2h6VyEGIfk9h1wTFrz+4hPpr9hCbK7XAnsr7vBRTTVtGIATQ3QmoJ4I1n6hLH9T0qGO+5Mu K2t50KugpzaJHaXx7bXoZ4RYZEFwKqhNJTpkoMImgnMOvc6jx41jL+lbdzPbSQhQ4ReXioBD6 qs0JyYJzNuTowuraliXuZWmWRYTrk/YJkiFIzH/H1FDkjhDxijpZFpZL5b/y8rclYyNZ7XZ75 EgYpTtfyCOntmVn61fyx4BrT+qMzBbRmE9UUeA== Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org From: Chuanxiao Dong Clock frequency values written to an mmc host should not be less than the minimum clock frequency which the mmc host supports. Signed-off-by: Yuan Juntao Signed-off-by: Pawel Wodkowski Signed-off-by: Ulf Hansson (cherry picked from commit e5905ff1281f0a0f5c9863c430ac1ed5faaf5707) Signed-off-by: Arnd Bergmann --- drivers/mmc/core/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.0 diff --git a/drivers/mmc/core/debugfs.c b/drivers/mmc/core/debugfs.c index 154aced0b91b..705586dcd9fa 100644 --- a/drivers/mmc/core/debugfs.c +++ b/drivers/mmc/core/debugfs.c @@ -220,7 +220,7 @@ static int mmc_clock_opt_set(void *data, u64 val) struct mmc_host *host = data; /* We need this check due to input value is u64 */ - if (val > host->f_max) + if (val != 0 && (val > host->f_max || val < host->f_min)) return -EINVAL; mmc_claim_host(host); 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;