[PATCH 1/2] m25p80: add additional sanity checks for erasure
fercerpav at gmail.com
Tue Sep 20 16:29:01 EDT 2011
On Tue, Sep 20, 2011 at 09:31:21PM +0200, Sascha Hauer wrote:
> On Thu, Sep 15, 2011 at 03:27:36PM +0400, Paul Fertser wrote:
> > This guards for the cases where the initial offset or byte count is
> > not aligned with regard to erase block size, thus making it impossible
> > for erase to do any harm to the nearby sectors.
> I'm unsure about this one. The other flash drivers allow to erase areas
> which are not eraseblock aligned. Maybe we should instead add a
> cdev->erasesize field. Then we can add this check in the generic code
> and fix this for all drivers.
I guess i was too surprised by seeing an endless loop when i tried to
erase an area of the wrong size (the counter underflowed) to think
about it in a less narrow-minded way, sorry, you're right of course.
Talking about generalisation, shouldn't the m25p80 driver be hooked
into the mtd subsystem to allow running ubi on top of it? By the
cursory look it seems to be doable without much effort.
Another question: should i repost this early (questionable) series you
seem to have missed?
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav at gmail.com
More information about the barebox