Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932835AbcDYPFY (ORCPT ); Mon, 25 Apr 2016 11:05:24 -0400 Received: from down.free-electrons.com ([37.187.137.238]:36601 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932459AbcDYPFX convert rfc822-to-8bit (ORCPT ); Mon, 25 Apr 2016 11:05:23 -0400 Date: Mon, 25 Apr 2016 17:05:10 +0200 From: Boris Brezillon To: =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , Brian Norris , Kamal Dasu Cc: linux-mtd@lists.infradead.org, Richard Weinberger , David Woodhouse , bcm-kernel-feedback-list@broadcom.com (open list:BROADCOM STB NAND FLASH DRIVER), linux-kernel@vger.kernel.org (open list) Subject: Re: [PATCH 3/3] mtd: brcmnand: respect ECC algorithm set by NAND subsystem Message-ID: <20160425170510.26a3eb63@bbrezillon> In-Reply-To: <1461324197-1333-3-git-send-email-zajec5@gmail.com> References: <1461324197-1333-1-git-send-email-zajec5@gmail.com> <1461324197-1333-3-git-send-email-zajec5@gmail.com> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1038 Lines: 34 On Fri, 22 Apr 2016 13:23:15 +0200 Rafał Miłecki wrote: > It's more reliable than guessing based on ECC strength. It allows using > NAND on devices with BCH-1 (e.g. D-Link DIR-885L). Brian, Kamal, could you add your Ack on this patch. > > Signed-off-by: Rafał Miłecki > --- > drivers/mtd/nand/brcmnand/brcmnand.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mtd/nand/brcmnand/brcmnand.c b/drivers/mtd/nand/brcmnand/brcmnand.c > index c3331ff..dcb22dc 100644 > --- a/drivers/mtd/nand/brcmnand/brcmnand.c > +++ b/drivers/mtd/nand/brcmnand/brcmnand.c > @@ -1927,7 +1927,7 @@ static int brcmnand_setup_dev(struct brcmnand_host *host) > > switch (chip->ecc.size) { > case 512: > - if (chip->ecc.strength == 1) /* Hamming */ > + if (chip->ecc.algo == NAND_ECC_HAMMING) > cfg->ecc_level = 15; > else > cfg->ecc_level = chip->ecc.strength; -- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com