Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1163314AbbKTTdr (ORCPT ); Fri, 20 Nov 2015 14:33:47 -0500 Received: from mail-pa0-f47.google.com ([209.85.220.47]:33306 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161551AbbKTTdp (ORCPT ); Fri, 20 Nov 2015 14:33:45 -0500 Date: Fri, 20 Nov 2015 11:33:42 -0800 From: Brian Norris To: Punnaiah Choudary Kalluri Cc: dwmw2@infradead.org, michals@xilinx.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, kpc528@gmail.com, kalluripunnaiahchoudary@gmail.com, Punnaiah Choudary Kalluri , Boris Brezillon Subject: Re: [PATCH] mtd: Expand the ecc placement locations to 1216 Message-ID: <20151120193342.GX64635@google.com> References: <1446742735-20824-1-git-send-email-punnaia@xilinx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1446742735-20824-1-git-send-email-punnaia@xilinx.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2248 Lines: 56 On Thu, Nov 05, 2015 at 10:28:55PM +0530, Punnaiah Choudary Kalluri wrote: > Device like MT29F32G08ABCDBJ4 have a writesize/oobsize of 16K/1216 Bytes. > So, increasing the maximum ecc placement locations to 1216 I'd really prefer not increasing the size of the internal arrays any more. The structures should be rewritten to be dynamic. > Signed-off-by: Punnaiah Choudary Kalluri > --- > include/linux/mtd/mtd.h | 2 +- > include/uapi/mtd/mtd-abi.h | 4 ++-- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h > index f17fa75..1fd3cc6 100644 > --- a/include/linux/mtd/mtd.h > +++ b/include/linux/mtd/mtd.h > @@ -95,7 +95,7 @@ struct mtd_oob_ops { > }; > > #define MTD_MAX_OOBFREE_ENTRIES_LARGE 32 > -#define MTD_MAX_ECCPOS_ENTRIES_LARGE 640 > +#define MTD_MAX_ECCPOS_ENTRIES_LARGE 1216 > /* > * Internal ECC layout control structure. For historical reasons, there is a > * similar, smaller struct nand_ecclayout_user (in mtd-abi.h) that is retained > diff --git a/include/uapi/mtd/mtd-abi.h b/include/uapi/mtd/mtd-abi.h > index 763bb69..c4d592c 100644 > --- a/include/uapi/mtd/mtd-abi.h > +++ b/include/uapi/mtd/mtd-abi.h > @@ -220,8 +220,8 @@ struct nand_oobfree { > __u32 length; > }; > > -#define MTD_MAX_OOBFREE_ENTRIES 8 > -#define MTD_MAX_ECCPOS_ENTRIES 64 > +#define MTD_MAX_OOBFREE_ENTRIES 32 > +#define MTD_MAX_ECCPOS_ENTRIES 1216 NAK. This is part of the ABI, and changing this will break user space. If you actually bothered to read code, you might understand why there are now internal and external versions of this struct. The external (user space) version cannot be changed. The internal version can be refactored, as long as the external version still maintains some sanity, at least for old/small devices. > /* > * OBSOLETE: ECC layout control structure. Exported to user-space via ioctl > * ECCGETLAYOUT for backwards compatbility and should not be mistaken as a Brian -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/