Vipin Kumar | 1 Apr 2011 08:28

Re: [PATCH] Newly erased page read workaround

On 3/31/2011 7:21 PM, Artem Bityutskiy wrote:
> Hi,
> 

Hello Artem,

> sorry for late reply, was too busy and also missed your patch somehow.
> 
> On Thu, 2011-02-24 at 11:40 +0530, Viresh Kumar wrote:
>> From: Vipin Kumar <vipin.kumar <at> st.com>
>>
>> A newly erased page contains ff in data as well as spare area. While reading an
>> erased page, the read out ecc from spare area does not match the ecc generated
>> by fsmc ecc hardware accelarator. This is because ecc of data ff ff is not ff
>> ff. This leads to errors when jffs2 fs erases and reads back the pages to
>> ensure consistency.
>>
>> This patch adds a software workaround to ensure that the ecc check is not
>> performed for erased pages. An erased page is checked by checking data as ff ff.
>>
>> Signed-off-by: Vipin Kumar <vipin.kumar <at> st.com>
>> Signed-off-by: Viresh Kumar <viresh.kumar <at> st.com>
>> Acked-by: Linus Walleij <linus.walleij <at> stericsson.com>
> 
> ...
> 
>> +		/*
>> +		 * This is a temporary erase check. A newly erased page read
>> +		 * would result in an ecc error because the oob data is also
>> +		 * erased to FF and the calculated ecc for an FF data is not
(Continue reading)

Artem Bityutskiy | 1 Apr 2011 08:51
Picon

Re: [PATCH] Newly erased page read workaround

On Fri, 2011-04-01 at 11:58 +0530, Vipin Kumar wrote:
> On 3/31/2011 7:21 PM, Artem Bityutskiy wrote:
> > Hi,
> > 
> 
> Hello Artem,
> 
> > sorry for late reply, was too busy and also missed your patch somehow.
> > 
> > On Thu, 2011-02-24 at 11:40 +0530, Viresh Kumar wrote:
> >> From: Vipin Kumar <vipin.kumar <at> st.com>
> >>
> >> A newly erased page contains ff in data as well as spare area. While reading an
> >> erased page, the read out ecc from spare area does not match the ecc generated
> >> by fsmc ecc hardware accelarator. This is because ecc of data ff ff is not ff
> >> ff. This leads to errors when jffs2 fs erases and reads back the pages to
> >> ensure consistency.
> >>
> >> This patch adds a software workaround to ensure that the ecc check is not
> >> performed for erased pages. An erased page is checked by checking data as ff ff.
> >>
> >> Signed-off-by: Vipin Kumar <vipin.kumar <at> st.com>
> >> Signed-off-by: Viresh Kumar <viresh.kumar <at> st.com>
> >> Acked-by: Linus Walleij <linus.walleij <at> stericsson.com>
> > 
> > ...
> > 
> >> +		/*
> >> +		 * This is a temporary erase check. A newly erased page read
> >> +		 * would result in an ecc error because the oob data is also
(Continue reading)

Riku Voipio | 1 Apr 2011 09:05
Picon
Picon
Favicon

Re: Is the mtd-utils common

On Thu, Mar 31, 2011 at 05:46:30PM +0300, Artem Bityutskiy wrote:
> On Wed, 2011-03-23 at 21:22 +0800, ll wrote:
> > Today I upgrade my ubuntu from 10.04 to 10.10. After the upgrade, when I
> > use mkfs.ubifs and ubinize to create image. It make error when I mount
> > the /dev/ubi0_0. The error message below. Does the ubuntu upgrade change
> > the version of mkfs.ubifs? The linux kernel version is 2.6.37. Could
> > anyone help me? 

> But this has been fixed. I think Ubuntu picked broken mtd-utils. Contact
> Ubuntu guys and ask them to pick newer mtd-utils. CCed Riku, he's a
> debian guy, may be he can advice something.

I'm quite sorry of this mess - I didn't watch closely enough and apparently
that version was picked up from debian by ubuntu automatically. I'm not an
ubuntu developer so I cannot change the version there. You will need to file
a bug in ubuntu bug tracker and find some ubuntu developer to change the version.

Alternatively you can try building mtd-utils yourself or upgrading yo ubuntu natty
beta, which has newer version already.

Riku

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

Artem Bityutskiy | 1 Apr 2011 09:25
Picon

[PATCH 1/2] UBIFS: unify error path dbg_debugfs_init_fs

From: Artem Bityutskiy <Artem.Bityutskiy <at> nokia.com>

This is just a small clean-up patch which simlifies and unifies the
error path in the dbg_debugfs_init_fs(). We have common error path
for all failure cases in this function except of the very first
case. And this patch makes the first failure case use the same
error path as the other cases by using the 'fname' and 'dent'
variables.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy <at> nokia.com>
---
 fs/ubifs/debug.c |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c
index 68cc992..4abaf72 100644
--- a/fs/ubifs/debug.c
+++ b/fs/ubifs/debug.c
 <at>  <at>  -2807,13 +2807,11  <at>  <at>  int dbg_debugfs_init_fs(struct ubifs_info *c)
 	struct ubifs_debug_info *d = c->dbg;

 	sprintf(d->dfs_dir_name, "ubi%d_%d", c->vi.ubi_num, c->vi.vol_id);
-	d->dfs_dir = debugfs_create_dir(d->dfs_dir_name, dfs_rootdir);
-	if (IS_ERR(d->dfs_dir)) {
-		err = PTR_ERR(d->dfs_dir);
-		ubifs_err("cannot create \"%s\" debugfs directory, error %d\n",
-			  d->dfs_dir_name, err);
+	fname = d->dfs_dir_name;
+	dent = debugfs_create_dir(fname, dfs_rootdir);
+	if (IS_ERR(dent))
(Continue reading)

Artem Bityutskiy | 1 Apr 2011 09:25
Picon

[PATCH 0/2] UBIFS: fix error path in dbg_debugfs_init_fs

Hi Phil,

I was not completely happy about your fix and here is the fix I like
more. It consists of 2 patches - the first one is preparational and
the second one is the fix. Please, take a look.

Artem.

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

Artem Bityutskiy | 1 Apr 2011 09:25
Picon

[PATCH 2/2] UBIFS: fix error path in dbg_debugfs_init_fs

From: Artem Bityutskiy <Artem.Bityutskiy <at> nokia.com>

The debug interface is substandard and on error returns either
NULL or an error code packed in the pointer. So using "IS_ERR"
for the pointers returned by debugfs function is incorrect.
Instead, we should use IS_ERR_OR_NULL.

This path is an improved vestion of the original patch from
Phil Carmody.

Reported-by: Phil Carmody <ext-phil.2.carmody <at> nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy <at> nokia.com>
---
 fs/ubifs/debug.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c
index 4abaf72..c04efa8 100644
--- a/fs/ubifs/debug.c
+++ b/fs/ubifs/debug.c
 <at>  <at>  -2809,25 +2809,25  <at>  <at>  int dbg_debugfs_init_fs(struct ubifs_info *c)
 	sprintf(d->dfs_dir_name, "ubi%d_%d", c->vi.ubi_num, c->vi.vol_id);
 	fname = d->dfs_dir_name;
 	dent = debugfs_create_dir(fname, dfs_rootdir);
-	if (IS_ERR(dent))
+	if (IS_ERR_OR_NULL(dent))
 		goto out;
 	d->dfs_dir = dent;

 	fname = "dump_lprops";
(Continue reading)

Artem Bityutskiy | 1 Apr 2011 09:25
Picon

Re: [PATCH] mtd: m25p80: add support for the MX25L1606E chip

On Fri, 2011-03-25 at 08:48 +0100, Gabor Juhos wrote:
> Signed-off-by: Gabor Juhos <juhosg <at> openwrt.org>
> ---
>  drivers/mtd/devices/m25p80.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)

Pushed to l2-mtd-2.6.git tree, thanks.

--

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Artem Bityutskiy | 1 Apr 2011 09:31
Picon

Re: [PATCH 2.6.34 1/2] cfi_cmdset_0002.c: Read max timeouts from cfi query data

On Fri, 2011-03-25 at 08:52 +0100, Markus Niebel wrote:
> The max timeouts are coded in the electronic flash data sheet (CFI query
> data). Read the timeouts and store them in the chips structure table.
> 
> Signed-off-by: Markus Niebel <markus.niebel <at> tqs.de>

Hi,

could CFI guys please review these patches?

http://thread.gmane.org/gmane.linux.drivers.mtd/34176
http://thread.gmane.org/gmane.linux.drivers.mtd/34177

--

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Artem Bityutskiy | 1 Apr 2011 10:11
Picon

Re: Mtd alignment bug affecting 1.4.X including current git

On Mon, 2011-03-28 at 07:48 -0600, Kelly Anderson wrote:
> Erasing 128 Kibyte  <at>  0 --  0 % complete.libmtd: error!: unaligned 
> address 2, mtd0 page size is 2048
> 
> /usr/sbin/flash_eraseall: /dev/mtd0: MTD writeoob failure: Invalid argument
> Erasing 128 Kibyte  <at>  20000 --  3 % complete.libmtd: error!: unaligned 
> address 131074, mtd0 page size is 2048

What are the flashe_eraseall options you use?

--

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Artem Bityutskiy | 1 Apr 2011 10:16
Picon

Re: Mtd alignment bug affecting 1.4.X including current git

On Mon, 2011-03-28 at 07:48 -0600, Kelly Anderson wrote:
> If you create a patch I'll test it for you.

Kelly, would you please test the following patch:

From: Artem Bityutskiy <Artem.Bityutskiy <at> nokia.com>
Subject: [PATCH] libmtd: fix OOB read and write interface

When reading and writing OOB we specify the address as absolute
offset from the beginning of the MTD device. This offset is
basically an absolute page offset plus the OOB offset. And it does
not have to be aligned to the min. I/O unit size (NAND page size).

So fix the 'do_oob_op()' function and remove incorrect checking
that the offset is page-aligned. This check leads to the following
errors:

libmtd: error!: unaligned address 2, mtd0 page size is 2048

But obviously, the intent was to write to offset 2 of the OOB area
of the very first NAND page.

Instead of that incorrect check, we should check that the OOB offset
we write to is within the OOB size and the length is withing the OOB
size. This patch adds such check.

Reported-by: Kelly Anderson <kelly <at> silka.with-linux.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy <at> nokia.com>
---
 lib/libmtd.c |   12 ++++++++----
(Continue reading)


Gmane