Received: by 10.223.185.116 with SMTP id b49csp361692wrg; Thu, 15 Feb 2018 23:42:15 -0800 (PST) X-Google-Smtp-Source: AH8x226ubk6bpTVYPrqq9aNbFLVbgdPmMPkSpXmynuVdYKBgYka+WrY2bUn4BYcPcqXiheJEnr9h X-Received: by 10.99.123.74 with SMTP id k10mr4444386pgn.217.1518766935554; Thu, 15 Feb 2018 23:42:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518766935; cv=none; d=google.com; s=arc-20160816; b=ZNhdVtLYKVYGE7/VFtiK82qrfSbt6Wjzr7bzupHPIrg6hYtZC/Q0uayLObyrWz6Ynj xejVYDXf640oiOTGygCJhdhrweM5beHsGWTAI00GKuIGmwem3czpLmlUhhIMCxMAS6tV +izFxG9vaf7v2y+Z7OjeQXDQSczhPzpzgOCXFHirJX5h/Vnp0TCDOjaxZMj7VQ+387cB z4AvR2c2B6Rr6Xdw1jfJA3odbK+4TmJzvJwr1Me1hd3WyxRcZ/Xd+TPquxvnKQyNP9TQ ltBk3TW15oDsjxzpcYfF8T27MEmqwB175NlJR+zbXDCWiWq/b2ClVldhVO4tgXO0ea8t qgNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=OnlrOFz5Z4FnuAt+oL51u/ROt751hGYi4jBWgz9qfD4=; b=aT2IXp5Ug1KOZYIwNx1WMigCKdfsdrDKp9/E8IvVWTT22qFGHxcd3bWx3dQVKmW4Ul PMT8UhifN0q5YkY8+7QMBMvBjdJBRu0YPvpSl6sbAM8BQOuEwqyAyfQpLFEy0f+Hi/KD NT199JdCfW2XpCOqFAr1XCQauUXyQzD6kF8TAM0EGqP1JW5FM9jaJuMcjhhhBKREtupS 30ctY71lTSZlTxrTynDqXHipDgtXL64oriZXtbBpJjvrSmXetYCwyftYgYt0YLcOoinU qQiNMOBBBUeGROE8ZDlEB3sXh+Y1CsnyuYXVINdM7KWgZ1JBESbIPaSUzrXsTFudeC9f tXZA== ARC-Authentication-Results: i=1; mx.google.com; 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 f91-v6si5780711plf.498.2018.02.15.23.41.25; Thu, 15 Feb 2018 23:42: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; 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 S1424449AbeBOQQg (ORCPT + 99 others); Thu, 15 Feb 2018 11:16:36 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:34352 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1165458AbeBOPoW (ORCPT ); Thu, 15 Feb 2018 10:44:22 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 05C00117F; Thu, 15 Feb 2018 15:44:21 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kamal Dasu , Florian Fainelli , Boris Brezillon Subject: [PATCH 4.15 089/202] mtd: nand: brcmnand: Disable prefetch by default Date: Thu, 15 Feb 2018 16:16:29 +0100 Message-Id: <20180215151718.096273271@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180215151712.768794354@linuxfoundation.org> References: <20180215151712.768794354@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Kamal Dasu commit f953f0f89663c39f08f4baaa8a4a881401b65654 upstream. Brcm nand controller prefetch feature needs to be disabled by default. Enabling affects performance on random reads as well as dma reads. Signed-off-by: Kamal Dasu Fixes: 27c5b17cd1b1 ("mtd: nand: add NAND driver "library" for Broadcom STB NAND controller") Acked-by: Florian Fainelli Signed-off-by: Boris Brezillon Signed-off-by: Greg Kroah-Hartman --- drivers/mtd/nand/brcmnand/brcmnand.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) --- a/drivers/mtd/nand/brcmnand/brcmnand.c +++ b/drivers/mtd/nand/brcmnand/brcmnand.c @@ -2193,16 +2193,9 @@ static int brcmnand_setup_dev(struct brc if (ctrl->nand_version >= 0x0702) tmp |= ACC_CONTROL_RD_ERASED; tmp &= ~ACC_CONTROL_FAST_PGM_RDIN; - if (ctrl->features & BRCMNAND_HAS_PREFETCH) { - /* - * FIXME: Flash DMA + prefetch may see spurious erased-page ECC - * errors - */ - if (has_flash_dma(ctrl)) - tmp &= ~ACC_CONTROL_PREFETCH; - else - tmp |= ACC_CONTROL_PREFETCH; - } + if (ctrl->features & BRCMNAND_HAS_PREFETCH) + tmp &= ~ACC_CONTROL_PREFETCH; + nand_writereg(ctrl, offs, tmp); return 0;