[PATCH] MTD: drivers return bitlip info to mtd on read

Artem Bityutskiy dedekind1 at gmail.com
Tue Dec 27 03:33:37 EST 2011


On Mon, 2011-12-26 at 11:38 -0800, Mike Dunn wrote:
> This patch changes the meaning of the value returned by the read() and
> read_oob() mtd driver methods.  Previously, absent a hard error, these functions
> returned either -EUCLEAN (one or more bitflips were corrected) or 0 (no
> bitflips).  Drivers now return, absent a hard error, the maximum number of
> bitflips that were corrected on any one page.  
> 
> This change is made possible by the fact that all calls to the driver methods
> now go through mtd wrapper functions.  The values returned by those wrapper
> functions have not changed, nor have their meaning.  Only the values returned to
> the mtd wrappers by the driver have changed.
> 
> Tested with nandsim and onenand_sim.  The two drivers that were modified were
> compile-tested only.
> 
> Signed-off-by: Mike Dunn <mikedunn at newsguy.com>

Hi, I am not sure using the return code is a good way for this.

But please, proceed with working on your issues - this patch is not
going to hit 3.2 anyway - I think it is the 3.3 material. Linus promised
3.2 release this week, then we have the merge window, and then it is
time for further patches in this area.

I will do the other changes which I described in my cover letter. I
will also make a patch which adds a bitflips parameter to read/read_oob
and then you will implement 

But please, just make something which works for you for now and go on
with other DoC issues you have. Meantime I'll prepare the MTD basis
for you.

I think I'll first do the 3 items I described in my series. Then I'll
add "bitflips" parameter to read/read_oob() functions, but won't
implement or ever check it. After this you'll add your code.

How does this sound to you?

-- 
Best Regards,
Artem Bityutskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20111227/c209093c/attachment.sig>


More information about the linux-mtd mailing list