All of lore.kernel.org
 help / color / mirror / Atom feed
* 2.6.20 : BUG in nand_do_read_oob with MTD_OOB_PLACE ?
@ 2007-02-09 15:09 Matthieu CASTET
  2007-02-15 15:37 ` 2.6.20 : BUG in nand_do_read_oobwith " Matthieu CASTET
  0 siblings, 1 reply; 2+ messages in thread
From: Matthieu CASTET @ 2007-02-09 15:09 UTC (permalink / raw)
  To: linux-mtd

Hi,

2.6.20 nand mtd seems to read wrongly oob in MTD_OOB_PLACE.
If I dump a page with uboot I get [1] and if I dump it with nanddump I get [2].
As you could can see OOB doesn't match. Moreover the 2 snd 8 bytes OOB data
given by nanddump are the 1st 8 bytes OOB of the next page.

If we look in nand_base.c, we saw that in case of MTD_OOB_PLACE, the len of oob
is set to chip->ecc.layout->oobavail. This seems wrong as user expect to be
mtd->oobsize.

Does this bug is know ?

It seems quite critical as it impact on jffs2 (at least
jffs2_check_nand_cleanmarker).


Matthieu

[1]
        3f 00 57 00 0c 00 00 48  10 00 00 48 13 03 00 00                       
                                              
        00 40 00 30 00 00 70 30  74 01 00 40 03 20 c2 e3                       
                                              
        02 20 80 e0 02 00 50 e1  00 30 a0 e1 0e f0 a0 01                       
                                              
OOB:                                                                           
                                              
        96 a5 96 9a 05 ff c0 43                                                
                                              
        05 00 18 36 05 00 ff 0f
[2]
[....]
0x000001d0: 3f 00 57 00 0c 00 00 48 10 00 00 48 13 03 00 00                    
                                              
0x000001e0: 00 40 00 30 00 00 70 30 74 01 00 40 03 20 c2 e3                    
                                              
0x000001f0: 02 20 80 e0 02 00 50 e1 00 30 a0 e1 0e f0 a0 01                    
                                              
  OOB Data: 96 a5 96 9a 05 ff c0 43 fc 03 00 9a 05 ff c0 43

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: 2.6.20 : BUG in nand_do_read_oobwith MTD_OOB_PLACE ?
  2007-02-09 15:09 2.6.20 : BUG in nand_do_read_oob with MTD_OOB_PLACE ? Matthieu CASTET
@ 2007-02-15 15:37 ` Matthieu CASTET
  0 siblings, 0 replies; 2+ messages in thread
From: Matthieu CASTET @ 2007-02-15 15:37 UTC (permalink / raw)
  To: linux-mtd

Matthieu CASTET <matthieu.castet <at> parrot.fr> writes:

> 
> Hi,
> 
> 2.6.20 nand mtd seems to read wrongly oob in MTD_OOB_PLACE.
> If I dump a page with uboot I get [1] and if I dump it with nanddump I get [2].
> As you could can see OOB doesn't match. Moreover the 2 snd 8 bytes OOB data
> given by nanddump are the 1st 8 bytes OOB of the next page.
> 
> If we look in nand_base.c, we saw that in case of MTD_OOB_PLACE, the len of oob
> is set to chip->ecc.layout->oobavail. This seems wrong as user expect to be
> mtd->oobsize.
> 
> Does this bug is know ?
> 
Any news on that ?

I needed to patch nand_do_read_oob to use jffs2 with 2.6.20 [1].


Matthieu
[1]
if (ops->mode == MTD_OOB_RAW || ops->mode == MTD_OOB_PLACE)
                len = mtd->oobsize;
        else
                len = chip->ecc.layout->oobavail;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-02-15 15:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-09 15:09 2.6.20 : BUG in nand_do_read_oob with MTD_OOB_PLACE ? Matthieu CASTET
2007-02-15 15:37 ` 2.6.20 : BUG in nand_do_read_oobwith " Matthieu CASTET

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.