From mboxrd@z Thu Jan 1 00:00:00 1970 From: ryan@bluewatersys.com (Ryan Mallon) Date: Thu, 02 Sep 2010 10:21:29 +1200 Subject: [PATCH 28/74] Incrementing the ecc_pos array to contain 128 char In-Reply-To: References: <07ce8daf18d3a9f13864752074af3490a324d84c.1283161023.git.viresh.kumar@st.com> <1283170469.12995.53.camel@brekeke> <4C7CA278.9040902@st.com> <1283297810.2018.67.camel@brekeke> <4C7DD2FD.1080501@st.com> <1283337939.1958.20.camel@brekeke> <4C7E3344.2020202@st.com> <4C7EC43B.2050903@bluewatersys.com> Message-ID: <4C7ED1E9.4050208@bluewatersys.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 09/02/2010 09:54 AM, Kevin Cernekee wrote: > On Wed, Sep 1, 2010 at 2:23 PM, Ryan Mallon wrote: >> However, we are interested in having a proper solution to this problem. > > I would suggest using this patch as a starting point - could you > please review the changes and try it out? > > http://git.infradead.org/users/dedekind/l2-mtd-2.6.git/commitdiff/b6d6ae730be2750fac166ed9df11ee6ea54d9160 That patch still breaks the ABI by renaming struct nand_ecclayout to nand_ecclayout_user. Any application using the old names will have to be rewritten to compile against a new kernel. The old interface should remain unchanged in that include/mtd/mtd-abi.h. If an application using the old interface calls any of the ecc ioctls for a nand chip with > 64 bytes ecc it should return an error. I still think the eccpos field should be a pointer, so that it can allocate as much space as is needed for the ecc. This also means that the kernel doesn't need to be changed every time a new NAND chips appears with a bigger ecc size. ~Ryan -- Bluewater Systems Ltd - ARM Technology Solution Centre Ryan Mallon 5 Amuri Park, 404 Barbadoes St ryan at bluewatersys.com PO Box 13 889, Christchurch 8013 http://www.bluewatersys.com New Zealand Phone: +64 3 3779127 Freecall: Australia 1800 148 751 Fax: +64 3 3779135 USA 1800 261 2934