[PATCH 0/5] MTD: modify mtd api to return bitflip info on read operations

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Wed Nov 30 12:06:08 EST 2011


Hello,

Le Wed, 30 Nov 2011 09:00:48 -0800,
Mike Dunn <mikedunn at newsguy.com> a écrit :

> Thanks Thomas.  For some reason this post never made it to my inbox.  Pasted from the list archive...

Huh, strange. Let's see if this one reaches your Inbox.

> > Making this change in patch 1 will break the build if someone bisects
> > kernel changes between patch 1 and your other patches.
> 
> Then I guess it should be a single patch.  As a general rule, should individual patches 
> not be interdependent?

My understanding is that the kernel should be buildable at any given
point, so that things such as "git bisect" can easily be used. So, it's
not so much a "interdependence" question but rather a "buildability"
question.

Basically, you have to ensure that the kernel still builds when patch 1
is enabled, when patches 1+2 are enabled, when patches 1+2+3 are
enabled, etc.

> Well, then it wouldn't be a generic mtd read operation, and higher layers would have to be 
> aware of the type of device and call the appropriate read function.
> Fewer drivers would need to be patched, but patches to infrastructure code would be complicated 
> and make the resulting code ugly, I think.

True that having some drivers implementing the standard ->read()
method and some others implementing the extended ->readext() method
would be ugly.

> I'm not a flash expert, but I think that the greatest number of bitflips on any one page 
> is a sufficient diagnostic of the integrity of an eraseblock.  One bad page will make the 
> entire eraseblock unusable, so I'm not sure it's useful to report bitflips for specific pages.  

Ok, understood, that makes sense to me (but I'm not a flash expert
either).

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com



More information about the linux-mtd mailing list