All of lore.kernel.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: LiuShuo <b35362@freescale.com>
Cc: linuxppc-dev@linux.freescale.net, dwmw2@infradead.org,
	linux-mtd@lists.infradead.org, linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] mtd-utils: fix corrupt cleanmarker with flash_erase -j command
Date: Wed, 17 Aug 2011 10:39:17 +0300	[thread overview]
Message-ID: <1313566762.19563.3.camel@sauron> (raw)
In-Reply-To: <4E4B6F46.2050209@freescale.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: Artem Bityutskiy <dedekind1@gmail.com>
To: LiuShuo <b35362@freescale.com>
Cc: linuxppc-dev@linux.freescale.net, Li Yang <leoli@freescale.com>,
	dwmw2@infradead.org, linux-mtd@lists.infradead.org,
	linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] mtd-utils: fix corrupt cleanmarker with flash_erase -j command
Date: Wed, 17 Aug 2011 10:39:17 +0300	[thread overview]
Message-ID: <1313566762.19563.3.camel@sauron> (raw)
In-Reply-To: <4E4B6F46.2050209@freescale.com>

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

  reply	other threads:[~2011-08-17  7:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-03  5:50 [PATCH] mtd-utils: fix corrupt cleanmarker with flash_erase -j command b35362
2011-08-03  5:50 ` b35362
2011-08-16 15:06 ` Artem Bityutskiy
2011-08-16 15:06   ` Artem Bityutskiy
2011-08-16 19:42   ` Brian Norris
2011-08-16 19:42     ` Brian Norris
2011-08-17  7:35   ` LiuShuo
2011-08-17  7:35     ` LiuShuo
2011-08-17  7:39     ` Artem Bityutskiy [this message]
2011-08-17  7:39       ` Artem Bityutskiy
2011-08-18  1:20       ` Brian Norris
2011-08-18  1:20         ` Brian Norris
2011-08-08  8:16 b35362

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1313566762.19563.3.camel@sauron \
    --to=dedekind1@gmail.com \
    --cc=b35362@freescale.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linuxppc-dev@linux.freescale.net \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.