mtdchar, parallel erase with ioctl

Artem Bityutskiy dedekind1 at gmail.com
Mon Aug 15 11:24:52 EDT 2011


On Tue, 2011-08-02 at 15:00 +0530, srimugunthan dhandapani wrote:
> Hi all,
> The mtdchar layer when it does erase using ioctl, it takes  a lock
> mtd_mutex.So the erases can only be done sequentially one after
> another. The hardware that i am working on has multiple banks and
> supports parallel erase operations. I have modified mtd_unlocked_ioctl
> function in mtdchar.c, to not take lock for erase commands(as shown
> below). With that i am able to do parallel erases. Is this patch an
> acceptable solution or what is the correct way to do this?

No, mtd_mutex is needed e.g., because it makes sure that no-one removes
the MTD device meanwhile. I do not see why exactly mtd_mutex prevents
parallel erase.

-- 
Best Regards,
Artem Bityutskiy




More information about the linux-mtd mailing list