RE: Issue : jffs2 and ecc layout

2010-12-26 Thread Liu Hui-R64343
Hi, Ming, 
Yes, this patch has some issues and Artem has reverted it.
This patch is intent to fix the mtd_oobtest, step 4 issue, but it's wrong.
Please revert it. Sorry for that.


Best Regards,
Jason Liu


-Original Message-
From: Ming Lei [mailto:tom.leim...@gmail.com]
Sent: Friday, December 24, 2010 10:11 PM
To: Liu Hui-R64343; david.woodho...@intel.com
Cc: Ghorai, Sukumar; linux-...@lists.infradead.org; linux-
o...@vger.kernel.org; Charles Manning
Subject: Re: Issue : jffs2 and ecc layout

Hi Jason,

2010/12/24 Ming Lei tom.leim...@gmail.com:
 2010/12/24 Ming Lei tom.leim...@gmail.com:
 Hi,

 2010/12/24 Charles Manning mannin...@actrix.gen.nz:

 THis might be due to the way the omap2.c driver is now screwed up so
 that it does not read when not u32 aligned.

 Try this:
 http://www.spinics.net/linux/lists/linux-omap/msg42422.html

 Please report back if that fixes the problem for you.

 No, the patch doesn't fix the issue.

 #mount -t jffs2 /dev/mtdblock4 /mnt/cf

 mount: /dev/mtdblock4: can't read superblock

 [   41.216796] nand_do_read_oob: Attempt to read past end of page [
 41.216827] cannot read OOB for EB at , requested 152 bytes,
 read 0 bytes, error -22

When I revert the patch below from Jason,

   http://marc.info/?l=linux-kernelm=129015697513966w=2

mount will be OK but with some info printed, see below:

r...@beagleboard:~# mount -t jffs2 /dev/mtdblock4 /mnt/cf
[   39.662963] JFFS2 notice: (1324) jffs2_build_xattr_subsystem:
complete building xattr subsystem, 0
of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.

#mount
..
/dev/mtdblock4 on /media/cf type jffs2 (rw,relatime)

So seems the patch from Jason does cause the issue, maybe should be
dropped or fixed further.

thanks,
--
Lei Ming


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Issue : jffs2 and ecc layout

2010-12-24 Thread Ming Lei
Hi,

2010/12/24 Charles Manning mannin...@actrix.gen.nz:

 THis might be due to the way the omap2.c driver is now screwed up so that it
 does not read when not u32 aligned.

 Try this:
 http://www.spinics.net/linux/lists/linux-omap/msg42422.html

 Please report back if that fixes the problem for you.

No, the patch doesn't fix the issue.

thanks,
-- 
Lei Ming
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Issue : jffs2 and ecc layout

2010-12-24 Thread Ming Lei
2010/12/24 Ming Lei tom.leim...@gmail.com:
 Hi,

 2010/12/24 Charles Manning mannin...@actrix.gen.nz:

 THis might be due to the way the omap2.c driver is now screwed up so that it
 does not read when not u32 aligned.

 Try this:
 http://www.spinics.net/linux/lists/linux-omap/msg42422.html

 Please report back if that fixes the problem for you.

 No, the patch doesn't fix the issue.

#mount -t jffs2 /dev/mtdblock4 /mnt/cf

mount: /dev/mtdblock4: can't read superblock

[   41.216796] nand_do_read_oob: Attempt to read past end of page
[   41.216827] cannot read OOB for EB at , requested 152
bytes, read 0 bytes, error -22


thanks,
-- 
Lei Ming
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Issue : jffs2 and ecc layout

2010-12-24 Thread Ming Lei
Hi Jason,

2010/12/24 Ming Lei tom.leim...@gmail.com:
 2010/12/24 Ming Lei tom.leim...@gmail.com:
 Hi,

 2010/12/24 Charles Manning mannin...@actrix.gen.nz:

 THis might be due to the way the omap2.c driver is now screwed up so that it
 does not read when not u32 aligned.

 Try this:
 http://www.spinics.net/linux/lists/linux-omap/msg42422.html

 Please report back if that fixes the problem for you.

 No, the patch doesn't fix the issue.

 #mount -t jffs2 /dev/mtdblock4 /mnt/cf

 mount: /dev/mtdblock4: can't read superblock

 [   41.216796] nand_do_read_oob: Attempt to read past end of page
 [   41.216827] cannot read OOB for EB at , requested 152
 bytes, read 0 bytes, error -22

When I revert the patch below from Jason,

   http://marc.info/?l=linux-kernelm=129015697513966w=2

mount will be OK but with some info printed, see below:

r...@beagleboard:~# mount -t jffs2 /dev/mtdblock4 /mnt/cf
[   39.662963] JFFS2 notice: (1324) jffs2_build_xattr_subsystem:
complete building xattr subsystem, 0
of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.

#mount
..
/dev/mtdblock4 on /media/cf type jffs2 (rw,relatime)

So seems the patch from Jason does cause the issue, maybe should be
dropped or fixed further.

thanks,
-- 
Lei Ming
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Issue : jffs2 and ecc layout

2010-12-24 Thread Ming Lei
Hi,

2010/12/24 Charles Manning mannin...@actrix.gen.nz:

 THis might be due to the way the omap2.c driver is now screwed up so that it
 does not read when not u32 aligned.

 Try this:
 http://www.spinics.net/linux/lists/linux-omap/msg42422.html

 Please report back if that fixes the problem for you.

The patch is still a good catch, with it, the following error
message does disappear:

[  299.433197] uncorrectable error :
[  299.436737] uncorrectable error :
[  299.440338] mtd-read(0x530 bytes from 0xf9202d0) returned ECC error
[  299.447875] uncorrectable error :
[  299.451263] uncorrectable error :
[  299.454833] mtd-read(0x44 bytes from 0xf927efc) returned ECC error
[  299.461822] uncorrectable error :
[  299.465240] uncorrectable error :
[  299.468780] uncorrectable error :
[  299.472534] mtd-read(0x5a4 bytes from 0xf940d84) returned ECC error

If not applying this patch, even Jason's patch is reverted, the error message
above will be printed out very frequently during 'mount'.

thanks,
-- 
Lei Ming
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Issue : jffs2 and ecc layout

2010-12-24 Thread David Brownell
ISTR that while JFFS2 worked with NAND, it had
to reserve a few bytes of OOB data that might more
naturally be used for ECC data.  I've not looked
at your layout ... does it reserve those bytes
for use by JFFS, or is it using them for ECC?

Also, ISTR that Some People felt that using JFFS2
with NAND was sub-optimal.  Which is why we have other NAND filesystem choices, 
like UBI/UBIFS,
and  (currently out-of-tree) YAFFS2.

- Dave

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Issue : jffs2 and ecc layout

2010-10-07 Thread Vimal Singh
On Mon, Oct 4, 2010 at 12:59 PM, Ghorai, Sukumar s-gho...@ti.com wrote:


 -Original Message-
 From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-
 ow...@vger.kernel.org] On Behalf Of Ghorai, Sukumar
 Sent: Tuesday, September 28, 2010 6:17 PM
 To: linux-...@lists.infradead.org
 Cc: linux-omap@vger.kernel.org
 Subject: Issue : jffs2 and ecc layout

 Hi,
 I was using the following ecc layout which is not working to mount the
 jffs2 File-system. I was in 2.6.32 kernel and working; but same layout is
 not working with latest 2.6 kernel.

 Observation is that - no read request issued to the driver (say omap2.c).

 # mount -t jffs2 /dev/mtdblock4 /mnt/nand
 [   32.505218] cannot read OOB for EB at , requested 8 bytes, read
 0 bytes, error -22
 mount: Mounting /dev/mtdblock4 on /mnt/nand failed: Input/output error

 # dmesg
 3[   32.505218] cannot read OOB for EB at , requested 8 bytes,
 read 0 bytes, error -22

I do not think above issue has anything to do with the ECC layout.
But as I earlier pointed (in [1]), this change [2] has messed up
function 'omap_hwcontrol'.
All read/write functions read/write data from/to address
info-nand.IO_ADDR_(R/W), which is not set by new function
'gpmc_nand_write' (which still take care of writing address/cmd to
write registers). But since above pointer is not set (hence points to
address '0'), driver tries to read data from wrong location.

In fact, I would even suggest to try dumping nand command registers(or
use T32) and verify if commands issued were written correctly to
appropriate registers.



[1]: http://marc.info/?l=linux-omapm=128302624528822w=2
[2] commit: 
http://git.infradead.org/mtd-2.6.git/commitdiff/2c01946c6b9ebaa5a89710bc42ca224a7f52f227

-- 
Regards,
Vimal Singh
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: Issue : jffs2 and ecc layout

2010-10-07 Thread Ghorai, Sukumar


 -Original Message-
 From: Vimal Singh [mailto:vimal.neww...@gmail.com]
 Sent: Thursday, October 07, 2010 11:02 PM
 To: Ghorai, Sukumar
 Cc: linux-...@lists.infradead.org; linux-omap@vger.kernel.org
 Subject: Re: Issue : jffs2 and ecc layout
 
 On Mon, Oct 4, 2010 at 12:59 PM, Ghorai, Sukumar s-gho...@ti.com wrote:
 
 
  -Original Message-
  From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-
  ow...@vger.kernel.org] On Behalf Of Ghorai, Sukumar
  Sent: Tuesday, September 28, 2010 6:17 PM
  To: linux-...@lists.infradead.org
  Cc: linux-omap@vger.kernel.org
  Subject: Issue : jffs2 and ecc layout
 
  Hi,
  I was using the following ecc layout which is not working to mount the
  jffs2 File-system. I was in 2.6.32 kernel and working; but same layout
 is
  not working with latest 2.6 kernel.
 
  Observation is that - no read request issued to the driver (say
 omap2.c).
 
  # mount -t jffs2 /dev/mtdblock4 /mnt/nand
  [   32.505218] cannot read OOB for EB at , requested 8 bytes,
 read
  0 bytes, error -22
  mount: Mounting /dev/mtdblock4 on /mnt/nand failed: Input/output error
 
  # dmesg
  3[   32.505218] cannot read OOB for EB at , requested 8 bytes,
  read 0 bytes, error -22
 
 I do not think above issue has anything to do with the ECC layout.
 But as I earlier pointed (in [1]), this change [2] has messed up
 function 'omap_hwcontrol'.
[Ghorai] in that case how other layout is working? Say storing the ecc at end 
of the spare area is working.

 All read/write functions read/write data from/to address
 info-nand.IO_ADDR_(R/W), which is not set by new function
 'gpmc_nand_write' (which still take care of writing address/cmd to
 write registers). But since above pointer is not set (hence points to
 address '0'), driver tries to read data from wrong location.
[Ghorai] you can see following two line in _probe() function
info-nand.IO_ADDR_R = ioremap(info-phys_base, NAND_IO_SIZE);
info-nand.IO_ADDR_W = info-nand.IO_ADDR_R;

 
 In fact, I would even suggest to try dumping nand command registers(or
 use T32) and verify if commands issued were written correctly to
 appropriate registers.
[Ghorai] I mentioned read request does not come to driver.

 
 
 
 [1]: http://marc.info/?l=linux-omapm=128302624528822w=2
 [2] commit: http://git.infradead.org/mtd-
 2.6.git/commitdiff/2c01946c6b9ebaa5a89710bc42ca224a7f52f227
 
 --
 Regards,
 Vimal Singh
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: Issue : jffs2 and ecc layout

2010-10-04 Thread Ghorai, Sukumar


 -Original Message-
 From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-
 ow...@vger.kernel.org] On Behalf Of Ghorai, Sukumar
 Sent: Tuesday, September 28, 2010 6:17 PM
 To: linux-...@lists.infradead.org
 Cc: linux-omap@vger.kernel.org
 Subject: Issue : jffs2 and ecc layout
 
 Hi,
 I was using the following ecc layout which is not working to mount the
 jffs2 File-system. I was in 2.6.32 kernel and working; but same layout is
 not working with latest 2.6 kernel.
 
 Observation is that - no read request issued to the driver (say omap2.c).
 
 # mount -t jffs2 /dev/mtdblock4 /mnt/nand
 [   32.505218] cannot read OOB for EB at , requested 8 bytes, read
 0 bytes, error -22
 mount: Mounting /dev/mtdblock4 on /mnt/nand failed: Input/output error
 
 # dmesg
 3[   32.505218] cannot read OOB for EB at , requested 8 bytes,
 read 0 bytes, error -22
 
 Code:
  178 static struct nand_ecclayout hw_x16_romcode_oob_64 = {
  179 .eccbytes = 12,
  180 .eccpos = {
  181 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13
  182   },
  183 .oobfree = {
  184     {.offset = 14,
  185  .length = 50}
  186    }
  187 };
 
  1188  info-nand.ecc.layout = hw_x16_romcode_oob_64;
[Ghorai] 
Does anyone using similar layout for Jffs2? i.e. ECC store at beginning of the 
spare area?


 
 Regards,
 Ghorai
 
 --
 To unsubscribe from this list: send the line unsubscribe linux-omap in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Issue : jffs2 and ecc layout

2010-09-28 Thread Ghorai, Sukumar
Hi,
I was using the following ecc layout which is not working to mount the jffs2 
File-system. I was in 2.6.32 kernel and working; but same layout is not working 
with latest 2.6 kernel.

Observation is that - no read request issued to the driver (say omap2.c).

# mount -t jffs2 /dev/mtdblock4 /mnt/nand
[   32.505218] cannot read OOB for EB at , requested 8 bytes, read 0 
bytes, error -22
mount: Mounting /dev/mtdblock4 on /mnt/nand failed: Input/output error

# dmesg 
3[   32.505218] cannot read OOB for EB at , requested 8 bytes, read 0 
bytes, error -22

Code:
 178 static struct nand_ecclayout hw_x16_romcode_oob_64 = {
 179 .eccbytes = 12,
 180 .eccpos = {
 181 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13
 182   },
 183 .oobfree = {
 184     {.offset = 14,
 185  .length = 50}
 186    }
 187 };

 1188  info-nand.ecc.layout = hw_x16_romcode_oob_64;

Regards,
Ghorai

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Issue : jffs2 and ecc layout

2010-09-27 Thread Ghorai, Sukumar
Hi,
I was using the following ecc layout which is not working to mount the jffs2 
File-system. I was using this in 2.6.32 kernel and was working; but same layout 
is not working with latest 2.6 kernel.

Observation is that - no read request issued to the driver (say omap2.c).

# mount -t jffs2 /dev/mtdblock4 /mnt/nand
[   32.505218] cannot read OOB for EB at , requested 8 bytes, read 0 
bytes, error -22
mount: Mounting /dev/mtdblock4 on /mnt/nand failed: Input/output error

# dmesg 
3[   32.505218] cannot read OOB for EB at , requested 8 bytes, read 0 
bytes, error -22

Code:
 178 static struct nand_ecclayout hw_x16_romcode_oob_64 = {
 179 .eccbytes = 12,
 180 .eccpos = {
 181 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13
 182   },
 183 .oobfree = {
 184 {.offset = 14,
 185  .length = 50}
 186}
 187 };

 1188  info-nand.ecc.layout = hw_x16_romcode_oob_64;

Regards,
Ghorai


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html