Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8241405imu; Fri, 28 Dec 2018 13:30:15 -0800 (PST) X-Google-Smtp-Source: ALg8bN7ZOFezj3YjsDjM/s6JRonQvcy5nvQveBeRawegR13eAkwT2QixWipvyOm61oqwLjcLZGGQ X-Received: by 2002:a17:902:7107:: with SMTP id a7mr28904518pll.290.1546032615204; Fri, 28 Dec 2018 13:30:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546032615; cv=none; d=google.com; s=arc-20160816; b=c6bmPCj9i7h5XOycA0dLNGq43V7DDN4TIkjbyHMQf9EVsZTKtO3XBELzYNU5cnGCkq hivlw2K+59DWqA1NdEqpYsFNs+gCL8+rnRqLgsH2HNf9LgOraWkG++SfKQzNNTsfHD43 cb0f3t9+Sasw37WNtfzm6jfiZSNFS1Rd9cehBK2rL3dsZFDN2g3DtRgbcmxDKe1vUfsZ LJH87txwO4wHS0knFCU27OvvE3PoDQpM/W2yjqFVM93m6Va+Ke5oN6pCHqNXztasykEa WXr53Qn1IGeXe1Wv3DbzdLuC7FvM7JmSKCDF+8r+hY1126z2Jl5aPIigkSJ4hbA1XqBL J9iQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=E+yLUz81idJblc/zQ1y9I21ZvmocYiXNeCXHkiECDzw=; b=GPwhZMwRW9lX0LPflzAOPeRGC+qRP1VKYQDVtuzfr4Yp09QAuwJfBWdtoZOC11Safp Q2ouKnelzfDRY0boP041G0CboVWP3rfG4rgx2G4B3/Y4w8yuetDl5qS/KOznk33SQ2Js smWP0FMgGLpSXhV5OBI5+lzIL61TorDQ68ONEsY68F7+6IrOYzpcnK7I96OOGB3DHTFS CWxn7BI+u4qjCncJ0H0BhTxbNjv7YWtwYwvR3Jf2//QbabVRPpiEoYL9ebcgcDtF1GFZ fuhj8kYes4tK8Y4ScokzPoyx3ui47ntyEvXb27kvG2KXycXsnpaTRCxPuydj13iFMLWB 40sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Pm8TO084; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 s8si36276513pgm.508.2018.12.28.13.30.00; Fri, 28 Dec 2018 13:30:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Pm8TO084; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732422AbeL1Lyh (ORCPT + 99 others); Fri, 28 Dec 2018 06:54:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:53152 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732163AbeL1LxU (ORCPT ); Fri, 28 Dec 2018 06:53:20 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8EC532087F; Fri, 28 Dec 2018 11:53:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1545998000; bh=rNFWGOSuY61ybYB0O76/gp3LY7YdLFgDD5P2Ebe/Ycs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Pm8TO084rFYf3xf4Lv+1oEjXz4L07eaF8JyXrJogmy9Rihyh7coj+r3ElbhTAL3Ty t9G4/OFxIq7MVGE68FxW8njskOET2IjA5M+loyQgQCJ/v9Kk63FfGh9YXc8NUQ50es cNB7SurNR9vgRPhFVwyDhmI86te3xo7qmY2MIfF4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ulf Hansson Subject: [PATCH 4.19 14/46] mmc: core: Reset HPI enabled state during re-init and in case of errors Date: Fri, 28 Dec 2018 12:52:08 +0100 Message-Id: <20181228113125.623338120@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20181228113124.971620049@linuxfoundation.org> References: <20181228113124.971620049@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ulf Hansson commit a0741ba40a009f97c019ae7541dc61c1fdf41efb upstream. During a re-initialization of the eMMC card, we may fail to re-enable HPI. In these cases, that isn't properly reflected in the card->ext_csd.hpi_en bit, as it keeps being set. This may cause following attempts to use HPI, even if's not enabled. Let's fix this! Fixes: eb0d8f135b67 ("mmc: core: support HPI send command") Cc: Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/core/mmc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -1782,9 +1782,11 @@ static int mmc_init_card(struct mmc_host if (err) { pr_warn("%s: Enabling HPI failed\n", mmc_hostname(card->host)); + card->ext_csd.hpi_en = 0; err = 0; - } else + } else { card->ext_csd.hpi_en = 1; + } } /*