Ron | 25 Apr 07:31 2014
Picon

[PATCH] NAND_ECC_SOFT_BCH can support subpage reads too

Signed-off-by: Ron Lee <ron <at> debian.org>
---
 drivers/mtd/nand/nand_base.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 9d01c4d..7f5b814 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
 <at>  <at>  -4023,8 +4023,16  <at>  <at>  int nand_scan_tail(struct mtd_info *mtd)
 	chip->pagebuf = -1;

 	/* Large page NAND with SOFT_ECC should support subpage reads */
-	if ((ecc->mode == NAND_ECC_SOFT) && (chip->page_shift > 9))
-		chip->options |= NAND_SUBPAGE_READ;
+	switch (ecc->mode) {
+	case NAND_ECC_SOFT:
+	case NAND_ECC_SOFT_BCH:
+		if (chip->page_shift > 9)
+			chip->options |= NAND_SUBPAGE_READ;
+		break;
+
+	default:
+		break;
+	}

 	/* Fill in remaining MTD driver data */
 	mtd->type = nand_is_slc(chip) ? MTD_NANDFLASH : MTD_MLCNANDFLASH;
--

-- 
1.7.2.5
(Continue reading)

Kamal Dasu | 24 Apr 23:40 2014
Picon

[PATCH v2] mtd: nand: Add support to use nand_base poi databuf as bounce buffer

nand_base can be passed a kmap()'d buffers from highmem by
filesystems like jffs2. This results in failure to map the
physical address of the DMA buffer on various contoller
driver on different platforms. This change adds a chip option
to use preallocated databuf as bounce buffers used in
nand_do_read_ops() and nand_do_write_ops().
This allows for specific nand controller driver to set this
option as needed.

Signed-off-by: Kamal Dasu <kdasu.kdev <at> gmail.com>
---

Changes since v1:
 * Fix bytes to write calculation in nand_do_write_ops

 drivers/mtd/nand/nand_base.c | 28 +++++++++++++++++++++-------
 include/linux/mtd/nand.h     |  5 +++++
 2 files changed, 26 insertions(+), 7 deletions(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 9d01c4d..d94242a 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
 <at>  <at>  -1501,6 +1501,7  <at>  <at>  static int nand_do_read_ops(struct mtd_info *mtd, loff_t from,
 		mtd->oobavail : mtd->oobsize;

 	uint8_t *bufpoi, *oob, *buf;
+	int use_bufpoi;
 	unsigned int max_bitflips = 0;
 	int retry_mode = 0;
(Continue reading)

Kamal Dasu | 24 Apr 00:16 2014
Picon

Fwd: [PATCH] mtd: nand: Add support to use nand_base poi databuf as bounce buffer

nand_base can be passed a kmap()'d buffers from highmem by
filesystems like jffs2. This results in failure to map the
physical address of the DMA buffer on various contoller
driver on different platforms. This change adds a chip option
to use preallocated databuf as bounce buffers used in
nand_do_read_ops() and nand_do_write_ops().
This allows for specific nand controller driver to set this
option as needed.

Signed-off-by: Kamal Dasu <kdasu.kdev <at> gmail.com>
---
 drivers/mtd/nand/nand_base.c | 27 +++++++++++++++++++++------
 include/linux/mtd/nand.h     |  5 +++++
 2 files changed, 26 insertions(+), 6 deletions(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 9d01c4d..37d7315 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
 <at>  <at>  -1501,6 +1501,7  <at>  <at>  static int nand_do_read_ops(struct mtd_info
*mtd, loff_t from,
                mtd->oobavail : mtd->oobsize;

        uint8_t *bufpoi, *oob, *buf;
+       int use_bufpoi;
        unsigned int max_bitflips = 0;
        int retry_mode = 0;
        bool ecc_fail = false;
 <at>  <at>  -1522,10 +1523,16  <at>  <at>  static int nand_do_read_ops(struct mtd_info
*mtd, loff_t from,
(Continue reading)

Stas Sergeev | 23 Apr 17:11 2014
Picon

[PATCH 0/2] mtd-utils: add nandmarkblk tool

Hello.

I have googled and queried this list, and it seems, as
unbelievable as it is, there is no tool to mark nand blocks as
bad. So I wrote one myself.

The patches will follow.

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

Andrea Adami | 23 Apr 10:42 2014
Picon

Detection of pre-CFI Sharp NOR chips

Hello,

I'm trying to debug the detection of some hostic chips that exactly
ten years ago could be detected by cfi_probe...

http://lists.infradead.org/pipermail/linux-mtd/2004-April/009647.html

My findings are contradicting that possibility...I am testing on a
real consumer device, not a prototype,  and the setup is 2x16 on 32
bit bus (sa1100).

The readings are as follow:

Status Register is:80808080
JEDEC map_read IDentify 1:b000b0
JEDEC map_read IDentify 2:b000b0
CFI map_read at offset 0: b000b0
CFI map_read at offset 1: b000b0
CFI map_read at offset 2: 10001
CFI map_read at offset 3: 0
CFI map_read at offset 4: 0
CFI map_read at offset 5: ffffffff
CFI map_read at offset 6: 4000400
CFI map_read at offset 7: 0
CFI map_read at offset 8: b000b0
CFI map_read at offset 9: b000b0
CFI map_read at offset a: 0
CFI map_read at offset b: 0
CFI map_read at offset c: 0
CFI map_read at offset d: ffffffff
(Continue reading)

David Yat Sin | 21 Apr 21:41 2014
Picon

Estimating flash life by reading EC (Erase Counters)

Hi,
My goal is to be able to estimate the flash drive life in a production
environment, so if there is a better/easier way of achieving this,
please let me know.

I have a small embedded device using NAND than runs UBIFS for the user
partition. Our application constantly writes to log files, the log
files are appended and gzip'ed, so it is hard to determine how much
data is actually written to disk.

I am hoping to do this by:

1. Read the EC (Erase Count) headers for each page on the partition
2. Let my system run for several days/weeks/months
3. Read the EC headers again
4. Then extrapolate drive life expectancy by comparing number of erase
counts with the NAND endurance.

Is there a utility that I could use to read the Erase Counters on a
UBIFS partition?

Thank you
David

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

Tanya Brokhman | 20 Apr 20:39 2014

UBIFS CRC error, calculated from ubifs_check_node

Hi All

I'm hitting "UBIFS error (pid 1026): ubifs_check_node: bad CRC: 
calculated 0x79dbca01, read 0x31afb5d7" and as a result the partition is 
remounted as RO.

I'm using 3.10 based kernel.
The test scenario to reproduce this is:
1. fill the partition tested using dd
2. try to write some more data

There are no errors in the log from the ubi layer or from the underlying 
nand driver, both also testing crc.

I've tried disabling compression, mounting the partition as sync and 
issuing the write command with sync param. None of the former has any 
effect on this crash.
I tried disabling crc on data nodes. This lowered the possibility of 
hitting the above error but eventually, with stress test of concurrent 
read and write we hit the same error with a different node type.

Has any one encountered similar behavior? I'm not that much familiar 
with ubifs so any help will be highly appreciated!

Bellow is the snippet of the call stack in question and the command I 
used to hit it:
dd if=/dev/zero of=/firmware/file2 bs=1M count=5000
[ 187.472289] UBIFS error (pid 1026): ubifs_check_node: bad CRC: 
calculated 0x79dbca01, read 0x31afb5d7
[ 187.480925] UBIFS error (pid 1026): ubifs_check_node: bad node at LEB 
(Continue reading)

Tanya Brokhman | 20 Apr 20:39 2014

UBIFS CRC error, calculated from ubifs_check_node

Hi All

I'm hitting "UBIFS error (pid 1026): ubifs_check_node: bad CRC: 
calculated 0x79dbca01, read 0x31afb5d7" and as a result the partition is 
remounted as RO.

I'm using 3.10 based kernel.
The test scenario to reproduce this is:
1. fill the partition tested using dd
2. try to write some more data

There are no errors in the log from the ubi layer or from the underlying 
nand driver, both also testing crc.

I've tried disabling compression, mounting the partition as sync and 
issuing the write command with sync param. None of the former has any 
effect on this crash.
I tried disabling crc on data nodes. This lowered the possibility of 
hitting the above error but eventually, with stress test of concurrent 
read and write we hit the same error with a different node type.

Has any one encountered similar behavior? I'm not that much familiar 
with ubifs so any help will be highly apritiated!

Bellow is the snippet of the call stack in question and the command I 
used to hit it:
dd if=/dev/zero of=/firmware/file2 bs=1M count=5000
[ 187.472289] UBIFS error (pid 1026): ubifs_check_node: bad CRC: 
calculated 0x79dbca01, read 0x31afb5d7
[ 187.480925] UBIFS error (pid 1026): ubifs_check_node: bad node at LEB 
(Continue reading)

Tanya Brokhman | 20 Apr 13:52 2014

nandsim configuration question

Hi

I'm trying to use the nandsim but unfortunately encountered some 
difficulties in configuring it. I need to simulate mtd device with the 
following parameters:

Eraseblock size:                131072 bytes, 128.0 KiB
Minimum input/output unit size: 2048 bytes
Sub-page size:                  2048 bytes
OOB size:                       64 bytes
Bad blocks are allowed:         true
Device is writable:             true
Default UBI VID header offset:  2048
Default UBI data offset:        4096
Default UBI LEB size:           126976 bytes, 124.0 KiB
Maximum UBI volumes count:      128

I can't figure out how to set sub-page size to 2048. Or basically - how 
to disable sub-page support?

I found only usage examples so I'm using the following command:
modprobe nandsim first_id_byte=0x20 second_id_byte=0xaa 
third_id_byte=0x00 fourth_id_byte=0x15 overridesize=12 
cache_file=cashe_file.txt

the mtd device created is:
Name:                           NAND simulator partition 0
Type:                           nand
Eraseblock size:                131072 bytes, 128.0 KiB
Amount of eraseblocks:          4096 (536870912 bytes, 512.0 MiB)
(Continue reading)

Gupta, Pekon | 18 Apr 11:15 2014
Picon

update patch state on patchwork

Hi,

I was just wondering if there is a script which can automatically search the
git tree and update state of patch on patchwork [1]. If not then is it possible
to update the patch status from now onwards (or may be a month back) ?
This can be added as part of git-commit script used by Maintainers.

This would be helpful in reviewing and finding references. And would be
good for Maintainers too to keep a track of pending ones.

[1] http://patchwork.ozlabs.org/project/linux-mtd/list/

with regards, pekon

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

Leon Pollak | 17 Apr 21:10 2014

Problem with JFFS2 garbage collector

Hello to all.

About a month ago I already wrote here about the problem I have (see below).
At that time 3-4 of list members reacted saying this is the bug and there were 
some suggestions for testing/work-arounding it.

I kindly ask people to return to this issue and I am ready to debug the 
possible solutions/work-arounds....
-------------------------------------------
The following scenario produces a lot of errors -5 or crashes in the following 
case:
After initial flash partition burn from within U-Boot, JFFS2 partition is 
mounted RO at fstab, flashes are write protected by HW. 

On the first boot I:
- take HW flash write protect off;
- remount as RW;
- make a small update to a small file;
- sync;
- remount as RO;
- HW write protect ON.

At this moment I receive a lot of error -5 messages and sometimes even crash 
dumps.
This problem repeats at each sequential boot 5-8 times with each time less 
number of -5 errors till it finally is gone.

I will be very thankful to you for any tip what can be done.

Many thanks ahead and best regards
(Continue reading)


Gmane