linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Brian Norris <computersforpeace@gmail.com>
To: Punnaiah Choudary Kalluri <punnaiah.choudary.kalluri@xilinx.com>
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 <punnaia@xilinx.com>,
	Boris Brezillon <boris.brezillon@free-electrons.com>
Subject: Re: [PATCH] mtd: Expand the ecc placement locations to 1216
Date: Fri, 20 Nov 2015 11:33:42 -0800	[thread overview]
Message-ID: <20151120193342.GX64635@google.com> (raw)
In-Reply-To: <1446742735-20824-1-git-send-email-punnaia@xilinx.com>

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 <punnaia@xilinx.com>
> ---
>  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

  reply	other threads:[~2015-11-20 19:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-05 16:58 [PATCH] mtd: Expand the ecc placement locations to 1216 Punnaiah Choudary Kalluri
2015-11-20 19:33 ` Brian Norris [this message]
2015-11-21 15:29   ` punnaiah choudary kalluri
2015-11-30 21:11     ` Brian Norris
2015-12-01 16:06       ` punnaiah choudary kalluri
2015-12-01 11:15   ` Boris Brezillon
2015-12-01 16:11     ` punnaiah choudary kalluri

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151120193342.GX64635@google.com \
    --to=computersforpeace@gmail.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=dwmw2@infradead.org \
    --cc=kalluripunnaiahchoudary@gmail.com \
    --cc=kpc528@gmail.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=michals@xilinx.com \
    --cc=punnaia@xilinx.com \
    --cc=punnaiah.choudary.kalluri@xilinx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).