All of lore.kernel.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Brian Norris <computersforpeace@gmail.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [PATCH] libmtd: allow write operations when MEMWRITE is not supported
Date: Mon, 12 Dec 2011 23:26:43 +0200	[thread overview]
Message-ID: <1323725206.2297.24.camel@koala> (raw)
In-Reply-To: <1323459914-25294-1-git-send-email-computersforpeace@gmail.com>

On Fri, 2011-12-09 at 11:45 -0800, Brian Norris wrote:
> MEMWRITE is a recently introduced write interface for MTD; however, it
> is, for now, only supported on NAND flash. mtd-utils should fall back to
> old write methods when either ENOTTY or EOPNOTSUPP are returned.
> 
> This is a showstopper when, for instance, using ubiformat on NOR, which
> don't have a mtd->write_oob interface (and thus don't support MEMWRITE):
> 
>   ubiformat: formatting eraseblock 2 --  1 % complete  libmtd: error!: MEMWRITE ioctl failed for eraseblock 2 (mtd3)
>           error 122 (Operation not supported)
> 
> Signed-off-by: Brian Norris <computersforpeace@gmail.com>

I guess this require an urgent mtd-utils release.

Also, why you say 'for now', does even make-sense to implement this for
NOR?

I've also just pushed this patch, does it look OK to you?

>From a4699233f927738db633687a2276a9f3e127d799 Mon Sep 17 00:00:00 2001
From: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Date: Mon, 12 Dec 2011 23:24:59 +0200
Subject: [PATCH] mtd: document that MEMWRITE ioctl is NAND-specific

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
---
 include/mtd/mtd-abi.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/include/mtd/mtd-abi.h b/include/mtd/mtd-abi.h
index 1a7e1d2..36eace0 100644
--- a/include/mtd/mtd-abi.h
+++ b/include/mtd/mtd-abi.h
@@ -198,7 +198,8 @@ struct otp_info {
 #define MEMISLOCKED		_IOR('M', 23, struct erase_info_user)
 /*
  * Most generic write interface; can write in-band and/or out-of-band in various
- * modes (see "struct mtd_write_req")
+ * modes (see "struct mtd_write_req"). This ioctl is not supported for flashes
+ * without OOB, e.g., NOR flash.
  */
 #define MEMWRITE		_IOWR('M', 24, struct mtd_write_req)
 
-- 
1.7.6.4

  reply	other threads:[~2011-12-12 21:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-09 19:45 [PATCH] libmtd: allow write operations when MEMWRITE is not supported Brian Norris
2011-12-12 21:26 ` Artem Bityutskiy [this message]
2011-12-12 21:40   ` Brian Norris
2011-12-17 14:44     ` Artem Bityutskiy
2011-12-17 15:03       ` Peter Korsgaard
2011-12-17 15:11         ` Artem Bityutskiy
2011-12-19 18:45       ` Brian Norris
2011-12-19 20:38         ` Artem Bityutskiy
2011-12-12 21:29 ` Artem Bityutskiy

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=1323725206.2297.24.camel@koala \
    --to=dedekind1@gmail.com \
    --cc=computersforpeace@gmail.com \
    --cc=linux-mtd@lists.infradead.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.