public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Craig Peacock <Craig.Peacock@internode.on.net>
Cc: linux-mtd@lists.infradead.org
Subject: Re: Assistance with debugging ubi_io_read error -74 (ECC Error)
Date: Fri, 16 Mar 2012 13:53:01 +0200	[thread overview]
Message-ID: <1331898781.3730.63.camel@sauron.fi.intel.com> (raw)
In-Reply-To: <4F61D6CF.4080707@internode.on.net>

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

On Thu, 2012-03-15 at 22:17 +1030, Craig Peacock wrote:
> I'm trying to get UBI volumes/fs working on a Seagate GoFlex Home 
> platform with a custom kernel. The product orginally ships with a 
> working UBIFS. It has a Marvell Kirkwood (ARM) processor with a Toshiba 
> TC58NVG1S3ETA00 256Mbyte NAND flash and runs Kernel 2.6.22.18. It 
> appears to be based on Marvell LSP Version KW_LSP_4.3.4_patch22. One of 
> the kernel parameters is ubi.mtd=2,2048 setting the VID header to an 
> offset of 2048 bytes and avoiding subpages.
> 
> I've recompiled my own kernel for the board based on Linux 3.2.9 but I 
> am unable to successfully use UBIFS even when I set the VID header to a 
> 2048 byte offset.

From a quick glance your driver has issues with reading. When you
disable subpage usage in UBI - this will only mean that it won't _write_
sub-pages, but it will still read them. Every drivers should allow
reading less than a full NAND page.

...

> # flash_erase /dev/mtd2 0 0
> # ubiformat /dev/mtd2 -s 2048 -O 2048
> # ubiattach -p /dev/mtd2 -O 2048

...

> UBI error: ubi_io_read: error -74 (ECC error) while reading 512 bytes 
> from PEB 0:2048, read 512 bytes

Read 512 from page-aligned address does not work - check the driver.

> uncorrectable error :
> ...
> UBI error: ubi_io_read: error -74 (ECC error) while reading 64 bytes 
> from PEB 1989:0, read 64 bytes

Reading 64 bytes from aligned address 0 does not work - check the
driver.

I guess the problem is that your driver does not support sub-pages, but
still believes it supports them. You can hack it quickly and make
mtd->subpage_sft to be 0, then the NAND base code wont try to do subpage
reads.

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

      reply	other threads:[~2012-03-16 11:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-15 11:47 Assistance with debugging ubi_io_read error -74 (ECC Error) Craig Peacock
2012-03-16 11:53 ` Artem Bityutskiy [this message]

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=1331898781.3730.63.camel@sauron.fi.intel.com \
    --to=dedekind1@gmail.com \
    --cc=Craig.Peacock@internode.on.net \
    --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