Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756144AbcCBAoT (ORCPT ); Tue, 1 Mar 2016 19:44:19 -0500 Received: from mail333.us4.mandrillapp.com ([205.201.137.77]:43800 "EHLO mail333.us4.mandrillapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756096AbcCAX4w (ORCPT ); Tue, 1 Mar 2016 18:56:52 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=mandrill; d=linuxfoundation.org; b=bmgeKIQsnAl6uZG9GQzoBtEoucMYFgF6UUAgMBObatLt983y97GJUGIq2x2LtYw+zembPdq0q+wV hjkz3Dj6ZONSC4lYtpIu2Ipz4sgbhqOAvHR9Jpaz3r2aksqqZG7paliXt2LNbqMwNRzicb6QcEdn WWoKMopMDBbqd1zIPkI=; From: Greg Kroah-Hartman Subject: [PATCH 4.4 135/342] mmc: sdio: Fix invalid vdd in voltage switch power cycle X-Mailer: git-send-email 2.7.2 To: Cc: Greg Kroah-Hartman , , Adrian Hunter , Ulf Hansson Message-Id: <20160301234532.323693847@linuxfoundation.org> In-Reply-To: <20160301234527.990448862@linuxfoundation.org> References: <20160301234527.990448862@linuxfoundation.org> X-Report-Abuse: Please forward a copy of this message, including all headers, to abuse@mandrill.com X-Report-Abuse: You can also report abuse here: http://mandrillapp.com/contact/abuse?id=30481620.0a2f62096b3342d19b179ca7b24781ed X-Mandrill-User: md_30481620 Date: Tue, 01 Mar 2016 23:54:43 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1148 Lines: 35 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Adrian Hunter commit d9bfbb95ed598a09cf336adb0f190ee0ff802f0d upstream. The 'ocr' parameter passed to mmc_set_signal_voltage() defines the power-on voltage used when power cycling after a failure to set the voltage. However, in the case of mmc_sdio_init_card(), the value passed has the R4_18V_PRESENT flag set which is not valid for power-on and results in an invalid vdd. Fix by passing the card's ocr value which does not have the flag. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/core/sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c @@ -630,7 +630,7 @@ try_again: */ if (!powered_resume && (rocr & ocr & R4_18V_PRESENT)) { err = mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_180, - ocr); + ocr_card); if (err == -EAGAIN) { sdio_reset(host); mmc_go_idle(host);