Phil,

The issue with YAFFS was that it was not letting the MTD subsystem do
the ECC.  So YAFFS had an idea of where the ECC should be in the OOB
area but MTD allows the ECC to be relocated by the driver.  Thus YAFFS
would read the wrong bits for the ECC and would think that the ECC
failed because it didn't ask the MTD subsystem to give it the ECC bits.

Sincerely,
Chase Maupin
Software Applications
Catalog DSP Products
e-mail: [EMAIL PROTECTED]
phone: (281) 274-3285
> -----Original Message-----
> From: Phil Quiney [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 29, 2008 4:15 AM
> To: Maupin, Chase; Jon Povey; davinci-linux-open-
> [EMAIL PROTECTED]
> Subject: RE: YAFFS2 with checkpointing on DM355
> 
> Hi Chase,
> 
> Thanks for the tip about disabling HW ECC.
> 
> I tried doing what it says on the Wiki page (setting .eccmode =
> NAND_ECC_SOFT as I have LSP >=1.20, the kernel config option is not
there
> anymore). I then patched the yaffs2 with a CVS checkout of the YAFFS2
> source which is 'as of' 21&23 July 2008 (for yaffs_fs/yaffs_guts)
> according to the CVS Id tag.
> 
> I get a little further than Jon, in that I can mount a blank partition
as
> yaffs2 and load a file system from a .tgz file without error. When I
> umount I get a 'isCheckpointed=1' so all seems OK.
> 
> However, when I remount, the mount segments. I have tried rebooting
and
> the result is exactly the same. Any ideas what to try next?
> 
> What I don't understand is the Wiki page says the HW ECC should be
> disabled for YAFFS to work - how come the YAFFS2 that is in the kernel
> tree 'as shipped' appears to work without the HW ECC being disabled?
> 
> YAFFS built:Jul 29 2008 09:17:10
> $Id: yaffs_fs.c,v 1.68 2008-07-23 03:35:12 charles Exp $
> $Id: yaffs_guts.c,v 1.59 2008-07-21 01:03:19 charles Exp $
> 
> [EMAIL PROTECTED]:~# mount -t yaffs2 /dev/mtdblock4 /mnt/nand
> yaffs: dev is 32505860 name is "mtdblock4"
> yaffs: passed flags ""
> yaffs: Attempting MTD mount on 31.4, "mtdblock4"
> Unable to handle kernel NULL pointer dereference at virtual address
> 00000000
> pgd = c57b0000
> [00000000] *pgd=855d3031, *pte=00000000, *ppte=00000000
> Internal error: Oops: 817 [#1]
> Modules linked in:
> CPU: 0
> PC is at nand_davinci_select_chip+0x3c/0x44
> LR is at nand_read_oob_hwecc+0xd4/0x32c
> pc : [<c01c1f8c>]    lr : [<c01be298>]    Not tainted
> sp : c52eba08  ip : c52eba18  fp : c52eba14
> r10: c08fd800  r9 : fffffcb2  r8 : c08fd980
> r7 : fffffcb2  r6 : 20820000  r5 : 00000000  r4 : 80000000
> r3 : c07f0d60  r2 : c08fd980  r1 : fffff2c8  r0 : 00000000
> Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32  Segment user
> Control: 5317F  Table: 857B0000  DAC: 00000015
> Process mount (pid: 1124, stack limit = 0xc52ea1a0)
> Stack: (0xc52eba08 to 0xc52ec000)
> ba00:                   c52eba6c c52eba18 c01be298 c01c1f60 c0495980
> 00000005
> ba20: c52eba44 c52eba30 20820040 fffffcb2 c52ea000 fffff2c8 96441040
> 00000000
> ba40: c0123e20 20820000 fffffcb2 c066be00 c52ebb18 00020000 fffffcb2
> 00000000
> ba60: c52eba9c c52eba70 c01b7ae4 c01be1d4 00000040 c52ebabc c2494360
> c4bbb000
> ba80: c3013000 c066be00 c4bbb000 00000000 c52ebb0c c52ebaa0 c0132114
> c01b7a4c
> baa0: 00000040 c52ebabc c2494360 c2494360 00000000 00000000 00000000
> 00000000
> bac0: 00000021 00000002 00000040 00000800 c52ebd16 00000001 ee719bed
> 00000000
> bae0: c274442e c4bbb000 be590002 c27481c8 000081c8 00000001 00017e00
> c02f85bc
> bb00: c52ebbd4 c52ebb10 c012ff6c c0131fdc 00000000 00000021 00000000
> 00000000
> bb20: 00000000 00000000 00000000 00000000 00000000 55555555 aaaaaaaa
> 00000001
> bb40: 00000002 00000001 00000800 00000003 00000000 00000000 00000000
> 00000021
> bb60: aaaaaaaa 00000001 00000002 00000040 00000800 00000003 00000000
> 00000000
> bb80: 00000000 00000021 00000000 00000000 00000000 00000000 00000000
> 00000000
> bba0: 00000000 55555555 c0128d74 000b3b3b 00000000 0000018e 00000000
> 00004033
> bbc0: 00017e00 00000000 c52ebc74 c52ebbd8 c012d970 c012feac 0000000a
> 00000003
> bbe0: 00000000 00000003 c52ebc0c 00002fc0 c4bbb000 3837a1d0 c5444000
> c4bbb000
> bc00: c52ebc44 c52ebc10 c012a180 c00566d8 488ed76c 3837a1d0 00002fc0
> c4bbb000
> bc20: 00000028 00002c49 0000008e 00000013 000b3b3b 00000000 0000018e
> 00000000
> bc40: 00004033 00000000 c4bbb000 c6c9bcfc c4bbb000 c3013800 0000000a
> 00000046
> bc60: 00000000 c02f85bc c52ebd24 c52ebc78 c012e388 c012d7d4 000024f9
> 000024f9
> bc80: c02ef204 60000013 ffffdb07 00000000 00000031 c52ebcd4 000024f9
> c52ebcb0
> bca0: c0051ca0 00000000 60000013 ffffffff c52ebcd4 00000000 c52ea000
> 60000013
> bcc0: c02ef200 c02ef208 c52ebd04 c52ebcd8 c0051f5c c0051b2c c52ebcf4
> c52ebce8
> bce0: c02f85bc c02ae824 c6c9b600 c52ebd40 00000000 00000002 c52ebd14
> c4bbb000
> bd00: c066be00 c6c9b600 c02f85bc 00000000 00000000 00000002 c52ebda4
> c52ebd28
> bd20: c0126180 c012de28 00000000 00000000 00000000 c6c9b730 00000006
> 00000020
> bd40: 00000000 00000000 00000000 00000000 6264746d 6b636f6c 00000034
> 00000000
> bd60: c52ebf00 00000000 c52ebd84 c6c9b730 00000009 00000009 c52ebdb8
> c048aa1c
> bd80: c6c9b600 c048aa00 00000000 00000000 c52ebf00 00000000 c52ebdb4
> c52ebda8
> bda0: c01263dc c0125ac8 c52ebdfc c52ebdb8 c009a050 c01263c8 6264746d
> 6b636f6c
> bdc0: c6b30034 00000000 c52ebf00 c715ad60 0000000f c0485ba0 c715ad60
> c0485ba0
> bde0: fffffff4 c02f85dc c6b36000 00000000 c52ebe14 c52ebe00 c0126408
> c0099f38
> be00: c01263b8 c6b36000 c52ebe3c c52ebe18 c009a290 c01263fc 00000000
> c260f000
> be20: 00000000 c6b36000 00000000 c07bf000 c52ebf6c c52ebe40 c00b2634
> c009a244
> be40: c0081e4c c0081770 c55d3894 c57b0000 c0078830 c00780a8 000000ff
> 000000ff
> be60: c57b0000 00000000 c57b0000 00000000 c52ea000 ffffffeb c250bc20
> c0650300
> be80: c6c0e6e0 c6c0e710 00000001 c250bc20 c52ebedc c52ebea0 c003def0
> c0147284
> bea0: 000000b0 c250be88 c0081c84 c52ebf08 c52ebefc c52ebec0 c0075590
> c00749e0
> bec0: c02ed414 c52ebf08 60000013 00000000 c52ebf04 000001af 00000001
> 000000d0
> bee0: c02f0d54 00000000 c52ea000 c0650300 c52ebf3c c52ebf00 c0075790
> c00753a8
> bf00: c50b5910 c04857e0 00000010 c07bfea0 00000000 00000001 00000001
> 00000000
> bf20: c52ebf80 c00362f4 c52ea000 00900015 c52ebf4c c52ebf40 c00759f0
> c00756b4
> bf40: c52ebf6c 00000000 00000000 c260f000 c0ed0000 c00362f4 c52ea000
> 00900015
> bf60: c52ebfa4 c52ebf70 c00b2ab8 c00b2020 00000000 00023130 c52ebfac
> 00000000
> bf80: c6b36000 c07bf000 00000000 00024138 befffb7c 00000015 00000000
> c52ebfa8
> bfa0: c0035b60 c00b2a20 00000000 00024138 00024138 00024150 00024160
> c0ed0000
> bfc0: 00000000 00024138 befffb7c 00000000 befffb18 000218b8 00023130
> befffecf
> bfe0: 400d0770 befffb04 0000a7f4 400d077c 60000010 00024138 9ffffeff
> 20000000
> Backtrace:
> [<c01c1f50>] (nand_davinci_select_chip+0x0/0x44) from [<c01be298>]
> (nand_read_o)
> [<c01be1c4>] (nand_read_oob_hwecc+0x0/0x32c) from [<c01b7ae4>]
> (part_read_oob+0)
> [<c01b7a3c>] (part_read_oob+0x0/0xb0) from [<c0132114>]
> (nandmtd2_ReadChunkWith)
>  r6 = 00000000  r5 = C4BBB000  r4 = C066BE00
> [<c0131fcc>] (nandmtd2_ReadChunkWithTagsFromNAND+0x0/0x1f8) from
> [<c012ff6c>] ()
> [<c012fe9c>] (yaffs_CheckpointRead+0x0/0x290) from [<c012d970>]
> (yaffs_Checkpoi)
> [<c012d7c4>] (yaffs_CheckpointRestore+0x0/0x654) from [<c012e388>]
> (yaffs_GutsI)
> [<c012de18>] (yaffs_GutsInitialise+0x0/0x141c) from [<c0126180>]
> (yaffs_interna)
> [<c0125ab8>] (yaffs_internal_read_super+0x0/0x8a4) from [<c01263dc>]
> (yaffs2_in)
> [<c01263b8>] (yaffs2_internal_read_super_mtd+0x0/0x34) from
[<c009a050>]
> (get_s)
> [<c0099f28>] (get_sb_bdev+0x0/0x184) from [<c0126408>]
> (yaffs2_read_super+0x1c/)
>  r8 = 00000000  r7 = C6B36000  r6 = C02F85DC  r5 = FFFFFFF4
>  r4 = C0485BA0
> [<c01263ec>] (yaffs2_read_super+0x0/0x28) from [<c009a290>]
> (do_kern_mount+0x5c)
> [<c009a234>] (do_kern_mount+0x0/0xf4) from [<c00b2634>]
> (do_mount+0x624/0x658)
> [<c00b2010>] (do_mount+0x0/0x658) from [<c00b2ab8>]
(sys_mount+0xa8/0xf4)
> [<c00b2a10>] (sys_mount+0x0/0xf4) from [<c0035b60>]
> (ret_fast_syscall+0x0/0x2c)
>  r7 = 00000015  r6 = BEFFFB7C  r5 = 00024138  r4 = 00000000
> Code: d5933024 d5823000 d5823004 d89da800 (e5800000)
>  Segmentation fault
> [EMAIL PROTECTED]:~#
> 
> 
> Regards
> 
> Phil Q
> 
> 
> Phil Quiney, Senior Software Engineer
> Trinity Convergence
> Cambridge Business Park
> Cowley Road
> Cambridge CB4 0WZ, UK
> T: +44(0)1223-435536
> F: +44(0)1223-435560
> www.trinityconvergence.com
> 
> 
> -----Original Message-----
> From: davinci-linux-open-source-
> [EMAIL PROTECTED]
> [mailto:davinci-linux-open-source-
> [EMAIL PROTECTED] On Behalf
Of
> Maupin, Chase
> Sent: 28 July 2008 15:08
> To: Jon Povey; davinci-linux-open-source@linux.davincidsp.com
> Subject: RE: YAFFS2 with checkpointing on DM355
> 
> Jon,
> 
> You may want to try disabling HW ECC on your board.  I have seen
> incompatibility issues between YAFFS and the HW ECC.  Check out the
> following page and see if this helps:
> 
>
http://wiki.davincidsp.com/index.php?title=Disabling_NAND_HW_ECC_support
> 
> Sincerely,
> Chase Maupin
> Software Applications
> Catalog DSP Products
> e-mail: [EMAIL PROTECTED]
> phone: (281) 274-3285
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On
> Behalf
> > Of Jon Povey
> > Sent: Thursday, July 24, 2008 3:19 AM
> > To: davinci-linux-open-source@linux.davincidsp.com
> > Subject: YAFFS2 with checkpointing on DM355
> >
> > Hooray, the list is back! :)
> > Hello again everybody.
> >
> > I want to get YAFFS2 with checkpointing working on DM355. We are
using
> > the MV kernel which comes with a 2005 dated implementation of YAFFS2
> > which does not support checkpoints leading to very slow mount times
> > (5.5s with my most trimmed-down filesystem so far).
> >
> > I got the latest YAFFS2 from CVS and it built, but does not work
> > properly: it mounts an erased partition, you can write some files to
> it
> > and unmount, but it fails to mount again:
> >
> > mount: wrong fs type, bad option, bad superblock on /dev/mtdblock3,
or
> > too many mounted file systems
> >
> > Also if I mount a clean mtd partition and try to untar about 200MB
> into
> > it, half way through or so I start getting a lot of console messages
> > about blocks being retired, and eventually "Allocator out!" messages
> and
> > the partition apparently being full. Lots of blocks (seems like
most)
> > end up being marked bad and flash_erase won't erase them (I used a
> JTAG
> > programmer to clear them).
> >
> > If anyone has faced and dealt with these issues then I'd like to
hear
> > from you.
> >
> > My guess from googling around is that it's to do with MTD layer
> > incompatibility between MV and recent mainstream kernels so I was
> going
> > to see how difficult it seemed to port the MTD layer back to MV.
> >
> > The other thought is, I wonder how much work would be needed to get
> > Davinci git kernel working on DM355? iirc it's not yet working.
> >
> > For now I think I will be trying to make the root fs very very very
> > small and living with the slow mount time :(
> >
> > --
> > Jon Povey, Design Engineer
> > [EMAIL PROTECTED] | +44(0)1280 825983
> >
> >
> > Racelogic is a limited company registered in England. Registered
> number
> > 2743719 .
> > Registered Office Unit 10, Swan Business Centre, Osier Way,
> Buckingham,
> > Bucks, MK18 1TB .
> > The information contained in this electronic mail transmission is
> intended
> > by Racelogic Ltd for the use of the named individual or entity to
> which it
> > is directed and may contain information that is confidential or
> > privileged. If you have received this electronic mail transmission
in
> > error, please delete it from your system without copying or
forwarding
> it,
> > and notify the sender of the error by reply email so that the
sender's
> > address records can be corrected. The views expressed by the sender
of
> > this communication do not necessarily represent those of Racelogic
> Ltd.
> > Please note that Racelogic reserves the right to monitor e-mail
> > communications passing through its network
> > _______________________________________________
> > Davinci-linux-open-source mailing list
> > Davinci-linux-open-source@linux.davincidsp.com
> >
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
> _______________________________________________
> Davinci-linux-open-source mailing list
> Davinci-linux-open-source@linux.davincidsp.com
> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
_______________________________________________
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to