Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8209133imu; Fri, 28 Dec 2018 12:48:52 -0800 (PST) X-Google-Smtp-Source: ALg8bN6SHejs9/WiML1LxqQWPxMeBdvfLBr0T5FChIh7P0kxwlFbBDYfXRD1aQcGeH720rONkAnI X-Received: by 2002:a63:cf02:: with SMTP id j2mr28127262pgg.113.1546030132923; Fri, 28 Dec 2018 12:48:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546030132; cv=none; d=google.com; s=arc-20160816; b=W0hLsdZ1SzWWUmEoRiGY3P1aqptwE9ygOw8ACHxEzEww8u5SyIyLQsPgua3YPtpqSw OiSn09CMh5PaDkllHAb30379Ho7CIKD6LCnTLtepctuxqoggABowmvR+8sHSiG3H5h2T 2we2FtGUxS3FQ6nDQDAheEsm7eqkU5yF6jZQEDLub+/p0kK82iWPEMi+AM5ysBmbDK69 vF0M23GzpuadL0vLBODGG8LQgq3UvtesMp2KA0XkBswoU4LuWeh3YWC5wco2ooQGb2yH nCOweNQ9fsjsTK9CMyJoQMsvq3uDZVfuOMpc2mqKAoQd3vGkQEUqo4s8aYIgbOJ+AbHk +Oag== 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=S3a2sM/cQs9v/QmhiiSyAzQvvR+a+uYvolfd7wuH2Sg=; b=NbUwRNaRsaiVysRxlJ0l4YYSG6L2PqEewTt7h5MEP2fYrvmkJE0JyHWQ/V4Gsu+6N8 xNJ0dpPS/sZiVm0yajalcoF+ghli4D7aRbOIfvRnBAOVgUiOoTczT5d16moC/dA1T3mP J2eEMEpgoAHCNzvuI5YK4oM62H2aE40YQNFWYW8+jWYvYZZKPXOz5l6MbO1DqirkTu8C +Y3Ugc2SMhb1iQSJrog2yZbWitrNMTJ2bthNvcEbiY1NyYMjWUs8Rje+l9MkpVaczakK caz1yvtK0jwrlPWdgWYk5J6vP76+/YwBxcwVgtpLwMTEjw8Jj35KCZuTUoXpLTby1Zrs tZAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=yptcKQ29; 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 p66si7334771pfp.144.2018.12.28.12.48.37; Fri, 28 Dec 2018 12:48:52 -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=yptcKQ29; 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 S1732258AbeL1LxZ (ORCPT + 99 others); Fri, 28 Dec 2018 06:53:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:53204 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732247AbeL1LxX (ORCPT ); Fri, 28 Dec 2018 06:53:23 -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 22B3920879; Fri, 28 Dec 2018 11:53:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1545998002; bh=CRxbNYMTZ4mAfj+7HJ7fNbtDF43mih1a82ulzvcifJ4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yptcKQ29DjNGm2y3Whzmk4KWl7DLVUteqLiesw0VX4hdYI+MU7YLt1DYcQe61RHHz UjcKjVPV0DLQxFmjc5UsdZ+KfkJ97i9s6c6/V4F4sB5vvQ1DsJKrwjZ3gf4uqv0t7m uOUNCIfmY05LAnGaHoeCCDTtIMG6Soy/KBfLbCto= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pratibhasagar V , Ulf Hansson Subject: [PATCH 4.19 15/46] mmc: core: Allow BKOPS and CACHE ctrl even if no HPI support Date: Fri, 28 Dec 2018 12:52:09 +0100 Message-Id: <20181228113125.668730098@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 ba9f39a785a9977e72233000711ef1eb48203551 upstream. In commit 5320226a0512 ("mmc: core: Disable HPI for certain Hynix eMMC cards"), then intent was to prevent HPI from being used for some eMMC cards, which didn't properly support it. However, that went too far, as even BKOPS and CACHE ctrl became prevented. Let's restore those parts and allow BKOPS and CACHE ctrl even if HPI isn't supported. Fixes: 5320226a0512 ("mmc: core: Disable HPI for certain Hynix eMMC cards") Cc: Pratibhasagar V Cc: Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/core/mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -526,8 +526,7 @@ static int mmc_decode_ext_csd(struct mmc card->cid.year += 16; /* check whether the eMMC card supports BKOPS */ - if (!mmc_card_broken_hpi(card) && - ext_csd[EXT_CSD_BKOPS_SUPPORT] & 0x1) { + if (ext_csd[EXT_CSD_BKOPS_SUPPORT] & 0x1) { card->ext_csd.bkops = 1; card->ext_csd.man_bkops_en = (ext_csd[EXT_CSD_BKOPS_EN] & @@ -1793,8 +1792,7 @@ static int mmc_init_card(struct mmc_host * If cache size is higher than 0, this indicates * the existence of cache and it can be turned on. */ - if (!mmc_card_broken_hpi(card) && - card->ext_csd.cache_size > 0) { + if (card->ext_csd.cache_size > 0) { err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_CACHE_CTRL, 1, card->ext_csd.generic_cmd6_time);