public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: eugene.kozlov@promwad.com
To: linux-mtd@lists.infradead.org
Subject: Re: samsung nand jffs2 errors
Date: Thu, 18 Jan 2007 13:15:01 +0200 (EET)	[thread overview]
Message-ID: <36051.127.0.0.1.1169118901.squirrel@localhost> (raw)
In-Reply-To: <55455.127.0.0.1.1169044977.squirrel@localhost>


The problem has been solved by adding a delay after
jffs2_check_nand_cleanmarker(c, jeb); in function jffs2_scan_eraseblock()
Can somebody explain this???
It also makes mounting partition alittle slower.

I use Samsung nand flash
http://samsung.com/products/semiconductor/NANDFlash/SLC_SmallBlock/512Mbit/K9F1208U0B/K9F1208U0B.htm
and apply harware specific value:
        nand_chip->chip_delay = 20; //encreasing this hasn't affect

ps: i use right parameters of page and eraseblock sizes: 512 and 16384 Bytes

--- scan.c      2007-01-08 13:41:45.000000000 +0000
+++ scan.c.mod  2007-01-18 12:42:26.000000000 +0000
@@ -330,6 +330,9 @@
        if (jffs2_cleanmarker_oob(c)) {
                int ret = jffs2_check_nand_cleanmarker(c, jeb);
                D2(printk(KERN_NOTICE "jffs_check_nand_cleanmarker
returned %d\n",ret));
+//lieugene
+#include <linux/delay.h>;
+               msleep(1);
                /* Even if it's not found, we still scan to see
                   if the block is empty. We use this information
                   to decide whether to erase it or not. */

> Hello
> I have good working samsung 64MB k9f1208uob nand flash on 2.6.16 kernel
> with at91rm9200 patch and our board specific patches:
> md5sum on images writed to /dev/mtdblock/1 is ok.
>
> But when i use jffs2 its returned errors and wrong md5sum on images writed
> to jffs2.
> To prepare jffs2 image i use: mkfs.jffs2 -o jffs2_image -s 512 -e 16384 -d
> jffs2_dir -p 0x4000 -n
> I erase flash with "flash_eraseall /dev/mtd/1" from mtd utils and copy
> image to flash by nandwrite.
> When mount - get such: (this happens on free space, nanddump below)
>
> 1)
> jffs2_scan_eraseblock(): Node at 0x00178008 {0x1985, 0x2003, 0x00000008)
> has invalid CRC 0x00000000 (calculated 0x6b7c27e6)
> jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0017800c:
> 0x0008 instead
> jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00178018:
> 0xff7f instead
> jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0017801c:
> 0xffff instead
> JFFS2: Erase block at 0x00178000 is not formatted. It will be erased
>
> and sometimes
> 2)
> mtd->read(0x400 bytes from 0x16d0000) returned ECC error
> jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x016d0000:
> 0x03f3 instead
> jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x016d0004:
> 0xffff instead
> Empty flash at 0x016d0008 ends at 0x016d0038
> jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x016d0038:
> 0xffff instead
> jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x016d003c:
> 0x0ca7 instead
> jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x016d0040:
> 0xf3f0 instead
> Empty flash at 0x016d0044 ends at 0x016d0070
> jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x016d0070:
> 0xffff instead
> jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x016d0074:
> 0x3f0c instead
> jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x016d0078:
> 0x65ff instead
> Empty flash at 0x016d007c ends at 0x016d00ac
> jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x016d00ac:
> 0xaaff instead
> jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x016d00b0:
> 0xff0f instead
> Further such events for this erase block will not be printed
> Empty flash at 0x016d00b8 ends at 0x016d00e4
> Empty flash at 0x016d00f0 ends at 0x016d0120
> Empty flash at 0x016d012c ends at 0x016d0158
> Empty flash at 0x016d0164 ends at 0x016d0194
> Empty flash at 0x016d01a0 ends at 0x016d01cc
> Empty flash at 0x016d01d8 ends at 0x016d0200
>
>
> This usual nanddump:
> /mnt/dataflash/nanddump -l 1 -p /dev/mtd/1 -s 0x3f18000
> No ECC status information available: Inappropriate ioctl for device
> Block size 16384, page size 512, OOB size 16
> Dumping data starting at 0x03f18000 and ending at 0x03f18001...
> 0x03f18000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x03f18010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x03f18020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x03f18030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x03f18040: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x03f18050: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x03f18060: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x03f18070: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x03f18080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x03f18090: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x03f180a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x03f180b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x03f180c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x03f180d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x03f180e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x03f180f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x03f18100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x03f18110: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x03f18120: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x03f18130: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x03f18140: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x03f18150: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x03f18160: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x03f18170: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x03f18180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x03f18190: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x03f181a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x03f181b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x03f181c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x03f181d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x03f181e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x03f181f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>   OOB Data: ff ff ff ff ff ff ff ff 85 19 03 20 08 00 00 00
>
> Thanks for advice
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>

  reply	other threads:[~2007-01-18 11:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-17 14:42 samsung nand jffs2 errors eugene.kozlov
2007-01-18 11:15 ` eugene.kozlov [this message]
     [not found] <200701190824404064520@163.com>
2007-01-19 14:39 ` eugene.kozlov

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=36051.127.0.0.1.1169118901.squirrel@localhost \
    --to=eugene.kozlov@promwad.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox