All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Barada <peter.barada@logicpd.com>
To: Ricard Wanderlof <ricard.wanderlof@axis.com>,
	Peter Barada <peter.barada@gmail.com>
Cc: "star@gmx.li" <star@gmx.li>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	"Andreas Bießmann" <andreas.biessmann@corscience.de>,
	"Peter Barada" <peter.barada@logicpd.com>,
	"biessmann@corscience.de" <biessmann@corscience.de>
Subject: Re: Aw: Re: Linux MTD: Per Partition ECC
Date: Wed, 12 Feb 2014 10:51:29 -0500	[thread overview]
Message-ID: <52FB9881.1020606@logicpd.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1402120840481.5908@lnxricardw.se.axis.com>

On 02/12/2014 02:44 AM, Ricard Wanderlof wrote:
>
> On Tue, 11 Feb 2014, Peter Barada wrote:
>
>> It may be possible to burn the bootloader into NAND using MTD_RAW_MODE
>> which _should_ disable all ECC for the operation, but in my case the ECC
>> generator is internal to the NAND chip itself and this won't work.
>>
>> I'm working on a possible solution in my linux-3.0 kernel, to modify
>> nand_get_device to take an extra pramater "no_ecc" which keys off
>> whether the NAND ops mode (if known) is MTD_OOB_RAW, and if so shut off
>> all ECC (including the in-chip ECC my NAND requires).    Then every NAND
>> operation will enable/disable ECC while getting the controller lock.
>
> I'm sure I don't understand this properly, but in the first paragraph
> you state that the ECC generator is internal to the NAND chip so that
> you can't disable ECC on a per-write basis using MTD_RAW_MODE, then in
> the second paragraph above you say that you want to add a parameter
> which disables ECC. But that is what MTD_OOB_RAW is supposed to do
> isn't it?
>
> Or is the real problem here that in the default routines in
> nand_base.c there is no way of notifying the _nand_chip_ which mode
> we're in? It should be possible though if you replace the appropriate
> default callbacks with chip-specific ones.
>
> /Ricard
My apologies, I should have mentioned I'm working within linux-3.0 and
am trying to implement a solution for units that are already in the
field - updating to a newer kernel isn't feasible at this time. Some of
the issues I'm up against may already been addressed in newer kernels.
I'll pull a new kernel and look at backporting the new ioctl(MEMWRITE)
into my kernel to fix the write()/ioctl(MEMWRITEOOB) multiple page-write
problem.

Rather than adding multiple chip-specific callbacks (and subsequent
duplicated code), I think it might be cleaner to add a parameter to
nand_get_device() for the mode, and a chip-specific call that
enables/disables chip ECC if the mode changes from what the chip is in.

-- 
Peter Barada
peter.barada@logicpd.com

  reply	other threads:[~2014-02-12 15:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <trinity-5aec7168-325d-4995-9e70-e4d2ce4b4816-1392119925322@3capp-gmx-bs63>
2014-02-11 12:44 ` Linux MTD: Per Partition ECC Andreas Bießmann
2014-02-11 15:43   ` Aw: " star
2014-02-11 16:23     ` Peter Barada
2014-02-12  6:07       ` Aw: " star
2014-02-12  7:33       ` Aw: " Brian Norris
2014-02-12  7:48         ` Ricard Wanderlof
2014-02-12  8:07           ` Brian Norris
2014-02-12  8:21             ` Ricard Wanderlof
2014-02-12  7:44       ` Ricard Wanderlof
2014-02-12 15:51         ` Peter Barada [this message]
2014-02-12 10:25     ` Andreas Bießmann

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=52FB9881.1020606@logicpd.com \
    --to=peter.barada@logicpd.com \
    --cc=andreas.biessmann@corscience.de \
    --cc=biessmann@corscience.de \
    --cc=linux-mtd@lists.infradead.org \
    --cc=peter.barada@gmail.com \
    --cc=ricard.wanderlof@axis.com \
    --cc=star@gmx.li \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.