public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Juergen Beisert <jbe@pengutronix.de>
To: linux-mtd@lists.infradead.org
Cc: Ravi Vasarla <ravi.vasarla@sasken.com>
Subject: Re: DOC2000 flash: Do I miss something?
Date: Tue, 24 Mar 2009 15:00:20 +0100	[thread overview]
Message-ID: <200903241500.20730.jbe@pengutronix.de> (raw)
In-Reply-To: <022F54DCE6CCCD45A5F9DF0B0B7BFEEB0635624082@EXGMBX01.sasken.com>

Hi,

On Dienstag, 24. März 2009, Ravi Vasarla wrote:
> Check the MTD drivers write size, usually pagesize is same as the
> writesize. In nandwrite.c the ioctl will fired only when passed the option
> like -a (autoplace) -n (noecc) passed. I guess it should not give below
> error with -j option. Check with the latest version of mtd-util of
> nandwrite.c file

$ nandwrite -j /dev/mtd1 /root.jffs2 (from ftp://ftp.infradead.org/pub/mtd-utils/mtd-utils-1.2.0.tar.bz2)

fails in this block (from nandwrite.c):

[...]
	/*
	 * force oob layout for jffs2 or yaffs ?
	 * Legacy support
	 */
	if (forcejffs2 || forceyaffs) {
		struct nand_oobinfo *oobsel = forcejffs2 ? &jffs2_oobinfo : &yaffs_oobinfo;

		if (autoplace) {
			fprintf(stderr, "Autoplacement is not possible for legacy -j/-y options\n");
			goto restoreoob;
		}
		if ((old_oobinfo.useecc == MTD_NANDECC_AUTOPLACE) && !forcelegacy) {
			fprintf(stderr, "Use -f option to enforce legacy placement on autoplacement enabled mtd device\n");
			goto restoreoob;
		}
		if (meminfo.oobsize == 8) {
			if (forceyaffs) {
				fprintf (stderr, "YAFSS cannot operate on 256 Byte page size");
				goto restoreoob;
			}
			/* Adjust number of ecc bytes */
			jffs2_oobinfo.eccbytes = 3;
		}

		if (ioctl (fd, MEMSETOOBSEL, oobsel) != 0) {  <----- this one fails
			perror ("MEMSETOOBSEL");
			goto restoreoob;
		}
	}
[...]

Hmm, "Legacy support" sounds more like "do not use in recent implementations
any more".

BTW: Simply erasing, mounting, untar my rootfilesystem into the DOC works without these
CLEANMARKER and ECC error messages.

Regards,
Juergen

  reply	other threads:[~2009-03-24 14:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-23  7:52 DOC2000 flash: Do I miss something? Juergen Beisert
2009-03-23  9:44 ` Ravi Vasarla
2009-03-23 10:21   ` Juergen Beisert
2009-03-23 19:29   ` Juergen Beisert
2009-03-24  6:46     ` Ravi Vasarla
2009-03-24  7:00       ` Ravi Vasarla
2009-03-24 12:49       ` Juergen Beisert
2009-03-24 13:07         ` Ravi Vasarla
2009-03-24 14:00           ` Juergen Beisert [this message]
2009-03-24 16:03             ` Ravi Vasarla

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=200903241500.20730.jbe@pengutronix.de \
    --to=jbe@pengutronix.de \
    --cc=linux-mtd@lists.infradead.org \
    --cc=ravi.vasarla@sasken.com \
    /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