All of lore.kernel.org
 help / color / mirror / Atom feed
From: Henric Eriksson <Henric.Eriksson@brv.se>
To: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Subject: Re: Flash corruption when using UBIFS filesystem on m25p80
Date: Wed, 25 Jun 2014 06:39:16 +0000	[thread overview]
Message-ID: <53AA6E94.8060509@brv.se> (raw)
In-Reply-To: <53A83529.9050007@brv.se>

Henric Eriksson skrev:
> Hello,
>
> We have a board with a Freescale i.MX28 running Linux kernel 3.14.3
> (Freescale mainline fork). This board has a Spansion S25FL512S Flash
> memory connected with support for Quad SPI communication. We've been
> working for a while now trying to use this as the main rootfs storage
> but have run into problems of Flash corruption when using UBIFS.
>
> $ mount -t ubifs /dev/ubi0_0 tmp/
> UBIFS: background thread "ubifs_bgt0_0" started, PID 480
> UBIFS error (pid 479): ubifs_scan: garbage
> UBIFS error (pid 479): ubifs_scanned_corruption: corruption at LEB 4:0
> UBIFS error (pid 479): ubifs_scanned_corruption: first 8192 bytes from
> LEB 4:0
> UBIFS error (pid 479): ubifs_scan: LEB 4 scanning failed
> UBIFS: background thread "ubifs_bgt0_0" stops
> mount: mounting /dev/ubi0_0 on tmp/ failed: Structure needs cleaning
>
> Subsequent mounts cause it to attempt recovery but it always inevitably
> fails with similar errors.
>

This turned out to be an issue with the underlying SPI driver spi-mxs 
attempting to use DMA mxs-dma for transfers with over 32 bytes in size. 
For some reason, this would corrupt the data. As a workaround we have 
for now disabled DMA access from the SPI driver and have since not 
experienced any issues whatsoever.

/Henric

      reply	other threads:[~2014-06-25  6:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-23 14:09 Flash corruption when using UBIFS filesystem on m25p80 Henric Eriksson
2014-06-25  6:39 ` Henric Eriksson [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=53AA6E94.8060509@brv.se \
    --to=henric.eriksson@brv.se \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.