public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Charles Manning <manningc2@actrix.gen.nz>
To: linux-mtd@lists.infradead.org
Subject: PATCH to help understanding
Date: Fri, 17 Dec 2004 16:24:09 +1300	[thread overview]
Message-ID: <20041217044111.066064A07@blood.actrix.co.nz> (raw)
In-Reply-To: <3C5AF025.F61F91F6@comdev.cc>

[-- Attachment #1: Type: text/plain, Size: 712 bytes --]

Hi folks

I propose the following patches to mtd.h to help the understanding of these 
functions.

read_ecc() and write_ecc() use the argument eccbuff, but this is really oob 
data being passed. The oob data might contain ecc info as well as other 
stuff. With the preferred autoplacement model, this will not have ecc info in 
it. Therefore I suggest a rename on this parameter.

suspend() and resume() are surely the functions for erase suspend and erase 
resume (for those NOR devices that provide this). Perhaps I goofed here and 
these are really power control functions (which would seem rather dodgy). If 
these are really power control fns, then where does erase suspend/resume get 
exposed?

-- Charles

[-- Attachment #2: mtd.h.patch --]
[-- Type: text/x-diff, Size: 1400 bytes --]

diff -Naur oldmtd/mtd.h mtd/mtd.h
--- oldmtd/mtd.h	Fri Dec 17 16:11:34 2004
+++ mtd/mtd.h	Fri Dec 17 16:12:57 2004
@@ -102,8 +102,8 @@
 	int (*read) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf);
 	int (*write) (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf);
 
-	int (*read_ecc) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf, u_char *eccbuf, struct nand_oobinfo *oobsel);
-	int (*write_ecc) (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf, u_char *eccbuf, struct nand_oobinfo *oobsel);
+	int (*read_ecc) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf, u_char *oobbuf, struct nand_oobinfo *oobsel);
+	int (*write_ecc) (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf, u_char *oobbuf, struct nand_oobinfo *oobsel);
 
 	int (*read_oob) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf);
 	int (*write_oob) (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf);
@@ -139,7 +139,7 @@
 	int (*lock) (struct mtd_info *mtd, loff_t ofs, size_t len);
 	int (*unlock) (struct mtd_info *mtd, loff_t ofs, size_t len);
 
-	/* Power Management functions */
+	/* Erase suspend function ???*/
 	int (*suspend) (struct mtd_info *mtd);
 	void (*resume) (struct mtd_info *mtd);
 

  parent reply	other threads:[~2004-12-17  4:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-01 14:24 Fwd: Re: JFFS XConfig David Mackay
2002-02-01 15:11 ` David Woodhouse
2002-02-01 17:33   ` debugging strategies for jffs2 Adam Wozniak
2002-02-01 18:04     ` David Woodhouse
2002-02-01 18:34       ` Adam Wozniak
2002-02-01 19:38         ` David Woodhouse
2002-02-01 19:44         ` Adam Wozniak
2002-02-01 21:40           ` Adam Wozniak
2002-02-01 23:11             ` David Woodhouse
2002-02-01 23:18               ` Adam Wozniak
2002-02-01 23:30                 ` David Woodhouse
2002-02-01 23:41                   ` Adam Wozniak
2004-12-17  3:24           ` Charles Manning [this message]
2004-12-20  6:59             ` PATCH to help understanding Thomas Gleixner

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=20041217044111.066064A07@blood.actrix.co.nz \
    --to=manningc2@actrix.gen.nz \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox