Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754997AbcCAXxr (ORCPT ); Tue, 1 Mar 2016 18:53:47 -0500 Received: from mail177-1.suw61.mandrillapp.com ([198.2.177.1]:60894 "EHLO mail177-1.suw61.mandrillapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753897AbcCAXxn (ORCPT ); Tue, 1 Mar 2016 18:53:43 -0500 From: Greg Kroah-Hartman Subject: [PATCH 3.14 100/130] 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: <20160301234503.362328126@linuxfoundation.org> In-Reply-To: <20160301234459.768886030@linuxfoundation.org> References: <20160301234459.768886030@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.98fc8ab0ae084e0ebc31dbac8af7f737 X-Mandrill-User: md_30481620 Date: Tue, 01 Mar 2016 23:53:32 +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: 1149 Lines: 35 3.14-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 @@ -670,7 +670,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);