* Issue : jffs2 and ecc layout
@ 2010-09-28 12:46 ` Ghorai, Sukumar
2010-10-04 7:29 ` Ghorai, Sukumar
2010-12-23 8:24 ` Ming Lei
0 siblings, 2 replies; 12+ messages in thread
From: Ghorai, Sukumar @ 2010-09-28 12:46 UTC (permalink / raw)
To: linux-mtd@lists.infradead.org; +Cc: linux-omap@vger.kernel.org
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 00000000, 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 00000000, 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
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: Issue : jffs2 and ecc layout
2010-09-28 12:46 ` Issue : jffs2 and ecc layout Ghorai, Sukumar
@ 2010-10-04 7:29 ` Ghorai, Sukumar
2010-10-07 17:31 ` Vimal Singh
2010-12-23 8:24 ` Ming Lei
1 sibling, 1 reply; 12+ messages in thread
From: Ghorai, Sukumar @ 2010-10-04 7:29 UTC (permalink / raw)
To: linux-mtd@lists.infradead.org; +Cc: linux-omap@vger.kernel.org
> -----Original Message-----
> From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
> owner@vger.kernel.org] On Behalf Of Ghorai, Sukumar
> Sent: Tuesday, September 28, 2010 6:17 PM
> To: linux-mtd@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 00000000, 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 00000000, 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 majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Issue : jffs2 and ecc layout
2010-10-04 7:29 ` Ghorai, Sukumar
@ 2010-10-07 17:31 ` Vimal Singh
2010-10-07 18:09 ` Ghorai, Sukumar
0 siblings, 1 reply; 12+ messages in thread
From: Vimal Singh @ 2010-10-07 17:31 UTC (permalink / raw)
To: Ghorai, Sukumar; +Cc: linux-omap@vger.kernel.org, linux-mtd@lists.infradead.org
On Mon, Oct 4, 2010 at 12:59 PM, Ghorai, Sukumar <s-ghorai@ti.com> wrote:
>
>
>> -----Original Message-----
>> From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
>> owner@vger.kernel.org] On Behalf Of Ghorai, Sukumar
>> Sent: Tuesday, September 28, 2010 6:17 PM
>> To: linux-mtd@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 00000000, 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 00000000, 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-omap&m=128302624528822&w=2
[2] commit: http://git.infradead.org/mtd-2.6.git/commitdiff/2c01946c6b9ebaa5a89710bc42ca224a7f52f227
--
Regards,
Vimal Singh
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: Issue : jffs2 and ecc layout
2010-10-07 17:31 ` Vimal Singh
@ 2010-10-07 18:09 ` Ghorai, Sukumar
0 siblings, 0 replies; 12+ messages in thread
From: Ghorai, Sukumar @ 2010-10-07 18:09 UTC (permalink / raw)
To: Vimal Singh; +Cc: linux-omap@vger.kernel.org, linux-mtd@lists.infradead.org
> -----Original Message-----
> From: Vimal Singh [mailto:vimal.newwork@gmail.com]
> Sent: Thursday, October 07, 2010 11:02 PM
> To: Ghorai, Sukumar
> Cc: linux-mtd@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-ghorai@ti.com> wrote:
> >
> >
> >> -----Original Message-----
> >> From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
> >> owner@vger.kernel.org] On Behalf Of Ghorai, Sukumar
> >> Sent: Tuesday, September 28, 2010 6:17 PM
> >> To: linux-mtd@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 00000000, 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 00000000, 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-omap&m=128302624528822&w=2
> [2] commit: http://git.infradead.org/mtd-
> 2.6.git/commitdiff/2c01946c6b9ebaa5a89710bc42ca224a7f52f227
>
> --
> Regards,
> Vimal Singh
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Issue : jffs2 and ecc layout
2010-09-28 12:46 ` Issue : jffs2 and ecc layout Ghorai, Sukumar
2010-10-04 7:29 ` Ghorai, Sukumar
@ 2010-12-23 8:24 ` Ming Lei
2010-12-24 3:02 ` Charles Manning
1 sibling, 1 reply; 12+ messages in thread
From: Ming Lei @ 2010-12-23 8:24 UTC (permalink / raw)
To: Ghorai, Sukumar; +Cc: linux-omap@vger.kernel.org, linux-mtd@lists.infradead.org
Hi,
2010/9/28 Ghorai, Sukumar <s-ghorai@ti.com>:
> 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 00000000, requested 8 bytes, read 0 bytes, error -22
> mount: Mounting /dev/mtdblock4 on /mnt/nand failed: Input/output error
I meet the issue too, kernel is 2.6.37-rc6-next-20101217+, and board is
beagle B5.
Is there any way to fix or workaround the issue?
thanks,
--
Lei Ming
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Issue : jffs2 and ecc layout
2010-12-23 8:24 ` Ming Lei
@ 2010-12-24 3:02 ` Charles Manning
2010-12-24 13:51 ` Ming Lei
2010-12-24 14:40 ` Ming Lei
0 siblings, 2 replies; 12+ messages in thread
From: Charles Manning @ 2010-12-24 3:02 UTC (permalink / raw)
To: Ming Lei
Cc: linux-omap@vger.kernel.org, linux-mtd@lists.infradead.org,
Ghorai, Sukumar
On Thursday 23 December 2010 21:24:35 Ming Lei wrote:
> Hi,
>
> 2010/9/28 Ghorai, Sukumar <s-ghorai@ti.com>:
> > 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 00000000, requested 8 bytes,
> > read 0 bytes, error -22 mount: Mounting /dev/mtdblock4 on /mnt/nand
> > failed: Input/output error
>
> I meet the issue too, kernel is 2.6.37-rc6-next-20101217+, and board is
> beagle B5.
>
> Is there any way to fix or workaround the issue?
>
>
> thanks,
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.
-- Charles
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Issue : jffs2 and ecc layout
2010-12-24 3:02 ` Charles Manning
@ 2010-12-24 13:51 ` Ming Lei
2010-12-24 13:56 ` Ming Lei
2010-12-24 14:40 ` Ming Lei
1 sibling, 1 reply; 12+ messages in thread
From: Ming Lei @ 2010-12-24 13:51 UTC (permalink / raw)
To: Charles Manning
Cc: linux-omap@vger.kernel.org, linux-mtd@lists.infradead.org,
Ghorai, Sukumar
Hi,
2010/12/24 Charles Manning <manningc2@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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Issue : jffs2 and ecc layout
2010-12-24 13:51 ` Ming Lei
@ 2010-12-24 13:56 ` Ming Lei
2010-12-24 14:10 ` Ming Lei
0 siblings, 1 reply; 12+ messages in thread
From: Ming Lei @ 2010-12-24 13:56 UTC (permalink / raw)
To: Charles Manning
Cc: linux-omap@vger.kernel.org, linux-mtd@lists.infradead.org,
Ghorai, Sukumar
2010/12/24 Ming Lei <tom.leiming@gmail.com>:
> Hi,
>
> 2010/12/24 Charles Manning <manningc2@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 00000000, requested 152
bytes, read 0 bytes, error -22
thanks,
--
Lei Ming
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Issue : jffs2 and ecc layout
2010-12-24 13:56 ` Ming Lei
@ 2010-12-24 14:10 ` Ming Lei
2010-12-27 2:12 ` Liu Hui-R64343
0 siblings, 1 reply; 12+ messages in thread
From: Ming Lei @ 2010-12-24 14:10 UTC (permalink / raw)
To: Jason Liu, David.Woodhouse
Cc: Charles Manning, linux-omap@vger.kernel.org,
linux-mtd@lists.infradead.org, Ghorai, Sukumar
Hi Jason,
2010/12/24 Ming Lei <tom.leiming@gmail.com>:
> 2010/12/24 Ming Lei <tom.leiming@gmail.com>:
>> Hi,
>>
>> 2010/12/24 Charles Manning <manningc2@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 00000000, requested 152
> bytes, read 0 bytes, error -22
When I revert the patch below from Jason,
http://marc.info/?l=linux-kernel&m=129015697513966&w=2
mount will be OK but with some info printed, see below:
root@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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Issue : jffs2 and ecc layout
2010-12-24 3:02 ` Charles Manning
2010-12-24 13:51 ` Ming Lei
@ 2010-12-24 14:40 ` Ming Lei
2010-12-24 18:37 ` David Brownell
1 sibling, 1 reply; 12+ messages in thread
From: Ming Lei @ 2010-12-24 14:40 UTC (permalink / raw)
To: Charles Manning
Cc: linux-omap@vger.kernel.org, linux-mtd@lists.infradead.org,
Ghorai, Sukumar
Hi,
2010/12/24 Charles Manning <manningc2@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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Issue : jffs2 and ecc layout
2010-12-24 14:40 ` Ming Lei
@ 2010-12-24 18:37 ` David Brownell
0 siblings, 0 replies; 12+ messages in thread
From: David Brownell @ 2010-12-24 18:37 UTC (permalink / raw)
To: Charles Manning, Ming Lei
Cc: linux-omap@vger.kernel.org, linux-mtd@lists.infradead.org,
SukumarGhorai
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: Issue : jffs2 and ecc layout
2010-12-24 14:10 ` Ming Lei
@ 2010-12-27 2:12 ` Liu Hui-R64343
0 siblings, 0 replies; 12+ messages in thread
From: Liu Hui-R64343 @ 2010-12-27 2:12 UTC (permalink / raw)
To: Ming Lei, David.Woodhouse@intel.com
Cc: Charles Manning, linux-omap@vger.kernel.org,
linux-mtd@lists.infradead.org, Ghorai, Sukumar
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.leiming@gmail.com]
>Sent: Friday, December 24, 2010 10:11 PM
>To: Liu Hui-R64343; David.Woodhouse@intel.com
>Cc: Ghorai, Sukumar; linux-mtd@lists.infradead.org; linux-
>omap@vger.kernel.org; Charles Manning
>Subject: Re: Issue : jffs2 and ecc layout
>
>Hi Jason,
>
>2010/12/24 Ming Lei <tom.leiming@gmail.com>:
>> 2010/12/24 Ming Lei <tom.leiming@gmail.com>:
>>> Hi,
>>>
>>> 2010/12/24 Charles Manning <manningc2@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 00000000, requested 152 bytes,
>> read 0 bytes, error -22
>
>When I revert the patch below from Jason,
>
> http://marc.info/?l=linux-kernel&m=129015697513966&w=2
>
>mount will be OK but with some info printed, see below:
>
>root@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
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2010-12-27 2:10 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <ActfCy0cZc3bW9yIT5u5fx8oZO9GQw==>
2010-09-28 12:46 ` Issue : jffs2 and ecc layout Ghorai, Sukumar
2010-10-04 7:29 ` Ghorai, Sukumar
2010-10-07 17:31 ` Vimal Singh
2010-10-07 18:09 ` Ghorai, Sukumar
2010-12-23 8:24 ` Ming Lei
2010-12-24 3:02 ` Charles Manning
2010-12-24 13:51 ` Ming Lei
2010-12-24 13:56 ` Ming Lei
2010-12-24 14:10 ` Ming Lei
2010-12-27 2:12 ` Liu Hui-R64343
2010-12-24 14:40 ` Ming Lei
2010-12-24 18:37 ` David Brownell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox