Thread (6 messages) flat view 6 messages, 3 authors, 2011-08-18

Re: [PATCH] mtd-utils: fix corrupt cleanmarker with flash_erase -j command

From: Artem Bityutskiy <dedekind1@gmail.com>
Date: 2011-08-17 07:37:40

On Wed, 2011-08-17 at 15:35 +0800, LiuShuo wrote:
I think We can add a new ioctl MEMSETOOBMODE for selecting a mode to 
access the OOB area.

Add new member into struct mtd_info:

struct mtd_info {
     ......

     enum {
          MTD_OOB_PLACE,
          MTD_OOB_AUTO,
          MTD_OOB_RAW,
     } oob_mode;
}

In function mtd_do_writeoob() (in drivers/mtd/mtdchar.c) :
     -  ops.mode = MTD_OOB_PLACE;
     + ops.mode = mtd->oob_mode;



Could we do it like this ?
I think the OOB mode should not be a global MTD device state. Each
ioctl invocation should just specify the mode.

Brian's idea of having a completely new ioctl or a set of new ioctls for
OOB which would copletely deprecate the old ones is a good idea. Let's
wait for his patch.

May be we should even start physically removing depricated ioctls by
first adding a printk with a warning and then removing completely. But
first mtdutils should be updated to not use them.

-- 
Best Regards,
Artem Bityutskiy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help