* UBIFS problem on MPC8536DS
@ 2009-10-14 10:54 Felix Radensky
2009-10-14 12:36 ` Adrian Hunter
2009-10-15 9:54 ` Norbert van Bolhuis
0 siblings, 2 replies; 29+ messages in thread
From: Felix Radensky @ 2009-10-14 10:54 UTC (permalink / raw)
To: linux-mtd, linuxppc-dev
Hi,
I have a strange problem in linux-2.6.31 running on MPC8536DS board.
It is 100% reproducible, by opening a 350MB tar file into ubifs volume
on NAND flash, and starting erase of NOR flash partition right after that.
If I don't start NOR erase, everything works fine. Also, If I run sync
after
tar, no problem occurs. The NOR flash is 32MB Spansion, NAND is
4GB Samsung.
The error messages are as follows:
UBI error: ubi_io_write: error -5 while writing 2048 bytes to PEB
5812:12288, written 0 bytes
UBI warning: ubi_eba_write_leb: failed to write data to PEB 5812
UBI: recover PEB 5812, move data to PEB 19400
UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB
5812:512, read 512 bytes
UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB
19400:512, written 0 bytes
UBI warning: recover_peb: failed to write to PEB 19400
UBI: try again
UBI: recover PEB 5812, move data to PEB 19401
UBI: run torture test for PEB 19400
UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB
19401:512, written 0 bytes
UBI warning: recover_peb: failed to write to PEB 19401
UBI: try again
UBI: recover PEB 5812, move data to PEB 19402
UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB
19402:512, written 0 bytes
UBI warning: recover_peb: failed to write to PEB 19402
UBI: try again
UBI: recover PEB 5812, move data to PEB 19403
UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB
19403:512, written 0 bytes
UBI warning: recover_peb: failed to write to PEB 19403
UBI warning: ubi_ro_mode: switch to read-only mode
UBIFS error (pid 1149): ubifs_wbuf_write_nolock: cannot write 2522 bytes
to LEB 389:10240, error -5
UBIFS warning (pid 1149): ubifs_ro_mode: switched to read-only mode,
error -5
UBIFS error (pid 1149): do_writepage: cannot write page 0 of inode
30708, error -5
UBIFS error (pid 1149): make_reservation: cannot reserve 858 bytes in
jhead 2, error -30
UBIFS error (pid 1149): do_writepage: cannot write page 2 of inode
29486, error -30
UBIFS error (pid 1149): make_reservation: cannot reserve 721 bytes in
jhead 2, error -30
UBIFS error (pid 1149): do_writepage: cannot write page 1 of inode
30070, error -30
UBI error: ubi_io_write: error -5 while writing 2048 bytes to PEB
5022:88064, written 0 bytes
UBI warning: ubi_eba_write_leb: failed to write data to PEB 5022
UBI: recover PEB 5022, move data to PEB 19404
UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB
5022:512, read 512 bytes
UBI error: ubi_io_write: read-only mode
UBI warning: recover_peb: failed to write to PEB 19404
UBI: try again
UBI: recover PEB 5022, move data to PEB 19405
UBI error: ubi_io_write: read-only mode
UBI warning: recover_peb: failed to write to PEB 19405
UBI: try again
UBI: recover PEB 5022, move data to PEB 19406
UBI error: ubi_io_write: read-only mode
UBI warning: recover_peb: failed to write to PEB 19406
UBI: try again
UBI: recover PEB 5022, move data to PEB 19407
UBI error: ubi_io_write: read-only mode
UBI warning: recover_peb: failed to write to PEB 19407
UBIFS error (pid 1044): ubifs_wbuf_sync_nolock: cannot write 2048 bytes
to LEB 788:86016
UBIFS error (pid 1044): ubifs_bg_wbufs_sync: cannot sync write-buffer,
error -30
UBIFS warning (pid 1044): ubifs_ro_mode: switched to read-only mode,
error -30
UBI error: ubi_io_write: error -5 while writing 2048 bytes to PEB
5817:26624, written 0 bytes
UBI warning: ubi_eba_write_leb: failed to write data to PEB 5817
UBI: recover PEB 5817, move data to PEB 19408
UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB
5817:512, read 512 bytes
UBI error: ubi_io_write: read-only mode
UBI warning: recover_peb: failed to write to PEB 19408
UBI: try again
UBI: recover PEB 5817, move data to PEB 19409
UBI error: ubi_io_write: read-only mode
UBI warning: recover_peb: failed to write to PEB 19409
UBI: try again
UBI: recover PEB 5817, move data to PEB 19410
UBI error: ubi_io_write: read-only mode
UBI warning: recover_peb: failed to write to PEB 19410
UBI: try again
UBI: recover PEB 5817, move data to PEB 19411
UBI error: ubi_io_write: read-only mode
UBI warning: recover_peb: failed to write to PEB 19411
UBIFS error (pid 1047): ubifs_wbuf_sync_nolock: cannot write 2048 bytes
to LEB 385:24576
UBIFS error (pid 1047): ubifs_bg_wbufs_sync: cannot sync write-buffer,
error -30
UBIFS error (pid 1149): make_reservation: cannot reserve 160 bytes in
jhead 1, error -30
UBIFS error (pid 1149): ubifs_write_inode: can't write inode 30709,
error -30
UBIFS error (pid 1149): make_reservation: cannot reserve 160 bytes in
jhead 1, error -30
UBIFS error (pid 1149): ubifs_write_inode: can't write inode 30710,
error -30
UBIFS error (pid 1149): make_reservation: cannot reserve 160 bytes in
jhead 1, error -30
UBIFS error (pid 1149): ubifs_write_inode: can't write inode 30698,
error -30
UBIFS error (pid 1149): make_reservation: cannot reserve 160 bytes in
jhead 1, error -30
UBIFS error (pid 1149): ubifs_write_inode: can't write inode 30711,
error -30
I'd appreciate any hints on what can cause this. Is it a hardware
problem, mtd layer problem
or UBI problem ?
Thanks a lot in advance.
Felix.
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: UBIFS problem on MPC8536DS
2009-10-14 10:54 UBIFS problem on MPC8536DS Felix Radensky
@ 2009-10-14 12:36 ` Adrian Hunter
2009-10-14 13:02 ` Felix Radensky
2009-10-14 13:21 ` Felix Radensky
2009-10-15 9:54 ` Norbert van Bolhuis
1 sibling, 2 replies; 29+ messages in thread
From: Adrian Hunter @ 2009-10-14 12:36 UTC (permalink / raw)
To: Felix Radensky; +Cc: linuxppc-dev, linux-mtd
Felix Radensky wrote:
> Hi,
>
> I have a strange problem in linux-2.6.31 running on MPC8536DS board.
> It is 100% reproducible, by opening a 350MB tar file into ubifs volume
> on NAND flash, and starting erase of NOR flash partition right after that.
>
> If I don't start NOR erase, everything works fine. Also, If I run sync
> after
> tar, no problem occurs. The NOR flash is 32MB Spansion, NAND is
> 4GB Samsung.
>
> The error messages are as follows:
>
> UBI error: ubi_io_write: error -5 while writing 2048 bytes to PEB
> 5812:12288, written 0 bytes
> UBI warning: ubi_eba_write_leb: failed to write data to PEB 5812
> UBI: recover PEB 5812, move data to PEB 19400
> UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB
> 5812:512, read 512 bytes
> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB
> 19400:512, written 0 bytes
> UBI warning: recover_peb: failed to write to PEB 19400
> UBI: try again
> UBI: recover PEB 5812, move data to PEB 19401
> UBI: run torture test for PEB 19400
> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB
> 19401:512, written 0 bytes
> UBI warning: recover_peb: failed to write to PEB 19401
> UBI: try again
> UBI: recover PEB 5812, move data to PEB 19402
> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB
> 19402:512, written 0 bytes
> UBI warning: recover_peb: failed to write to PEB 19402
> UBI: try again
> UBI: recover PEB 5812, move data to PEB 19403
> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB
> 19403:512, written 0 bytes
> UBI warning: recover_peb: failed to write to PEB 19403
> UBI warning: ubi_ro_mode: switch to read-only mode
> UBIFS error (pid 1149): ubifs_wbuf_write_nolock: cannot write 2522 bytes
> to LEB 389:10240, error -5
> UBIFS warning (pid 1149): ubifs_ro_mode: switched to read-only mode,
> error -5
> UBIFS error (pid 1149): do_writepage: cannot write page 0 of inode
> 30708, error -5
> UBIFS error (pid 1149): make_reservation: cannot reserve 858 bytes in
> jhead 2, error -30
> UBIFS error (pid 1149): do_writepage: cannot write page 2 of inode
> 29486, error -30
> UBIFS error (pid 1149): make_reservation: cannot reserve 721 bytes in
> jhead 2, error -30
> UBIFS error (pid 1149): do_writepage: cannot write page 1 of inode
> 30070, error -30
> UBI error: ubi_io_write: error -5 while writing 2048 bytes to PEB
> 5022:88064, written 0 bytes
> UBI warning: ubi_eba_write_leb: failed to write data to PEB 5022
> UBI: recover PEB 5022, move data to PEB 19404
> UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB
> 5022:512, read 512 bytes
> UBI error: ubi_io_write: read-only mode
> UBI warning: recover_peb: failed to write to PEB 19404
> UBI: try again
> UBI: recover PEB 5022, move data to PEB 19405
> UBI error: ubi_io_write: read-only mode
> UBI warning: recover_peb: failed to write to PEB 19405
> UBI: try again
> UBI: recover PEB 5022, move data to PEB 19406
> UBI error: ubi_io_write: read-only mode
> UBI warning: recover_peb: failed to write to PEB 19406
> UBI: try again
> UBI: recover PEB 5022, move data to PEB 19407
> UBI error: ubi_io_write: read-only mode
> UBI warning: recover_peb: failed to write to PEB 19407
> UBIFS error (pid 1044): ubifs_wbuf_sync_nolock: cannot write 2048 bytes
> to LEB 788:86016
> UBIFS error (pid 1044): ubifs_bg_wbufs_sync: cannot sync write-buffer,
> error -30
> UBIFS warning (pid 1044): ubifs_ro_mode: switched to read-only mode,
> error -30
> UBI error: ubi_io_write: error -5 while writing 2048 bytes to PEB
> 5817:26624, written 0 bytes
> UBI warning: ubi_eba_write_leb: failed to write data to PEB 5817
> UBI: recover PEB 5817, move data to PEB 19408
> UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB
> 5817:512, read 512 bytes
> UBI error: ubi_io_write: read-only mode
> UBI warning: recover_peb: failed to write to PEB 19408
> UBI: try again
> UBI: recover PEB 5817, move data to PEB 19409
> UBI error: ubi_io_write: read-only mode
> UBI warning: recover_peb: failed to write to PEB 19409
> UBI: try again
> UBI: recover PEB 5817, move data to PEB 19410
> UBI error: ubi_io_write: read-only mode
> UBI warning: recover_peb: failed to write to PEB 19410
> UBI: try again
> UBI: recover PEB 5817, move data to PEB 19411
> UBI error: ubi_io_write: read-only mode
> UBI warning: recover_peb: failed to write to PEB 19411
> UBIFS error (pid 1047): ubifs_wbuf_sync_nolock: cannot write 2048 bytes
> to LEB 385:24576
> UBIFS error (pid 1047): ubifs_bg_wbufs_sync: cannot sync write-buffer,
> error -30
> UBIFS error (pid 1149): make_reservation: cannot reserve 160 bytes in
> jhead 1, error -30
> UBIFS error (pid 1149): ubifs_write_inode: can't write inode 30709,
> error -30
> UBIFS error (pid 1149): make_reservation: cannot reserve 160 bytes in
> jhead 1, error -30
> UBIFS error (pid 1149): ubifs_write_inode: can't write inode 30710,
> error -30
> UBIFS error (pid 1149): make_reservation: cannot reserve 160 bytes in
> jhead 1, error -30
> UBIFS error (pid 1149): ubifs_write_inode: can't write inode 30698,
> error -30
> UBIFS error (pid 1149): make_reservation: cannot reserve 160 bytes in
> jhead 1, error -30
> UBIFS error (pid 1149): ubifs_write_inode: can't write inode 30711,
> error -30
>
> I'd appreciate any hints on what can cause this. Is it a hardware
> problem, mtd layer problem
> or UBI problem ?
It sounds like you are saying one MTD partition somehow affects another.
You should check the MTD partitions are set up correctly. Are you using
tools that make assumptions about which mtd partition is which?
How do you erase the NOR flash? Is the device node (/dev/mtd...) correct?
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: UBIFS problem on MPC8536DS
2009-10-14 12:36 ` Adrian Hunter
@ 2009-10-14 13:02 ` Felix Radensky
2009-10-14 13:21 ` Felix Radensky
1 sibling, 0 replies; 29+ messages in thread
From: Felix Radensky @ 2009-10-14 13:02 UTC (permalink / raw)
To: Adrian Hunter; +Cc: linuxppc-dev, linux-mtd
Hi, Adrian
Adrian Hunter wrote:
> Felix Radensky wrote:
>> Hi,
>>
>> I have a strange problem in linux-2.6.31 running on MPC8536DS board.
>> It is 100% reproducible, by opening a 350MB tar file into ubifs volume
>> on NAND flash, and starting erase of NOR flash partition right after
>> that.
>>
>> If I don't start NOR erase, everything works fine. Also, If I run
>> sync after
>> tar, no problem occurs. The NOR flash is 32MB Spansion, NAND is
>> 4GB Samsung.
>>
>> The error messages are as follows:
>>
>> UBI error: ubi_io_write: error -5 while writing 2048 bytes to PEB
>> 5812:12288, written 0 bytes
>> UBI warning: ubi_eba_write_leb: failed to write data to PEB 5812
>> UBI: recover PEB 5812, move data to PEB 19400
>> UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB
>> 5812:512, read 512 bytes
>> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB
>> 19400:512, written 0 bytes
>> UBI warning: recover_peb: failed to write to PEB 19400
>> UBI: try again
>> UBI: recover PEB 5812, move data to PEB 19401
>> UBI: run torture test for PEB 19400
>> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB
>> 19401:512, written 0 bytes
>> UBI warning: recover_peb: failed to write to PEB 19401
>> UBI: try again
>> UBI: recover PEB 5812, move data to PEB 19402
>> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB
>> 19402:512, written 0 bytes
>> UBI warning: recover_peb: failed to write to PEB 19402
>> UBI: try again
>> UBI: recover PEB 5812, move data to PEB 19403
>> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB
>> 19403:512, written 0 bytes
>> UBI warning: recover_peb: failed to write to PEB 19403
>> UBI warning: ubi_ro_mode: switch to read-only mode
>> UBIFS error (pid 1149): ubifs_wbuf_write_nolock: cannot write 2522
>> bytes to LEB 389:10240, error -5
>> UBIFS warning (pid 1149): ubifs_ro_mode: switched to read-only mode,
>> error -5
>> UBIFS error (pid 1149): do_writepage: cannot write page 0 of inode
>> 30708, error -5
>> UBIFS error (pid 1149): make_reservation: cannot reserve 858 bytes in
>> jhead 2, error -30
>> UBIFS error (pid 1149): do_writepage: cannot write page 2 of inode
>> 29486, error -30
>> UBIFS error (pid 1149): make_reservation: cannot reserve 721 bytes in
>> jhead 2, error -30
>> UBIFS error (pid 1149): do_writepage: cannot write page 1 of inode
>> 30070, error -30
>> UBI error: ubi_io_write: error -5 while writing 2048 bytes to PEB
>> 5022:88064, written 0 bytes
>> UBI warning: ubi_eba_write_leb: failed to write data to PEB 5022
>> UBI: recover PEB 5022, move data to PEB 19404
>> UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB
>> 5022:512, read 512 bytes
>> UBI error: ubi_io_write: read-only mode
>> UBI warning: recover_peb: failed to write to PEB 19404
>> UBI: try again
>> UBI: recover PEB 5022, move data to PEB 19405
>> UBI error: ubi_io_write: read-only mode
>> UBI warning: recover_peb: failed to write to PEB 19405
>> UBI: try again
>> UBI: recover PEB 5022, move data to PEB 19406
>> UBI error: ubi_io_write: read-only mode
>> UBI warning: recover_peb: failed to write to PEB 19406
>> UBI: try again
>> UBI: recover PEB 5022, move data to PEB 19407
>> UBI error: ubi_io_write: read-only mode
>> UBI warning: recover_peb: failed to write to PEB 19407
>> UBIFS error (pid 1044): ubifs_wbuf_sync_nolock: cannot write 2048
>> bytes to LEB 788:86016
>> UBIFS error (pid 1044): ubifs_bg_wbufs_sync: cannot sync
>> write-buffer, error -30
>> UBIFS warning (pid 1044): ubifs_ro_mode: switched to read-only mode,
>> error -30
>> UBI error: ubi_io_write: error -5 while writing 2048 bytes to PEB
>> 5817:26624, written 0 bytes
>> UBI warning: ubi_eba_write_leb: failed to write data to PEB 5817
>> UBI: recover PEB 5817, move data to PEB 19408
>> UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB
>> 5817:512, read 512 bytes
>> UBI error: ubi_io_write: read-only mode
>> UBI warning: recover_peb: failed to write to PEB 19408
>> UBI: try again
>> UBI: recover PEB 5817, move data to PEB 19409
>> UBI error: ubi_io_write: read-only mode
>> UBI warning: recover_peb: failed to write to PEB 19409
>> UBI: try again
>> UBI: recover PEB 5817, move data to PEB 19410
>> UBI error: ubi_io_write: read-only mode
>> UBI warning: recover_peb: failed to write to PEB 19410
>> UBI: try again
>> UBI: recover PEB 5817, move data to PEB 19411
>> UBI error: ubi_io_write: read-only mode
>> UBI warning: recover_peb: failed to write to PEB 19411
>> UBIFS error (pid 1047): ubifs_wbuf_sync_nolock: cannot write 2048
>> bytes to LEB 385:24576
>> UBIFS error (pid 1047): ubifs_bg_wbufs_sync: cannot sync
>> write-buffer, error -30
>> UBIFS error (pid 1149): make_reservation: cannot reserve 160 bytes in
>> jhead 1, error -30
>> UBIFS error (pid 1149): ubifs_write_inode: can't write inode 30709,
>> error -30
>> UBIFS error (pid 1149): make_reservation: cannot reserve 160 bytes in
>> jhead 1, error -30
>> UBIFS error (pid 1149): ubifs_write_inode: can't write inode 30710,
>> error -30
>> UBIFS error (pid 1149): make_reservation: cannot reserve 160 bytes in
>> jhead 1, error -30
>> UBIFS error (pid 1149): ubifs_write_inode: can't write inode 30698,
>> error -30
>> UBIFS error (pid 1149): make_reservation: cannot reserve 160 bytes in
>> jhead 1, error -30
>> UBIFS error (pid 1149): ubifs_write_inode: can't write inode 30711,
>> error -30
>>
>> I'd appreciate any hints on what can cause this. Is it a hardware
>> problem, mtd layer problem
>> or UBI problem ?
>
> It sounds like you are saying one MTD partition somehow affects another.
> You should check the MTD partitions are set up correctly. Are you using
> tools that make assumptions about which mtd partition is which?
>
> How do you erase the NOR flash? Is the device node (/dev/mtd...)
> correct?
>
>
I use flash_eraseall /dev/mtd4 to erase NOR. The version of mtd-utils is
from
latest mtd-utils git tree. The device nodes for NOR (mtd4) and NAND (mtd7)
are correct:
crwxr-xr-x 1 root root 90, 8 2005-08-07 13:11 mtd4
crw-r--r-- 1 root root 90, 14 2008-07-16 18:51 mtd7
Felix.
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: UBIFS problem on MPC8536DS
2009-10-14 12:36 ` Adrian Hunter
2009-10-14 13:02 ` Felix Radensky
@ 2009-10-14 13:21 ` Felix Radensky
2009-10-14 16:44 ` Adrian Hunter
1 sibling, 1 reply; 29+ messages in thread
From: Felix Radensky @ 2009-10-14 13:21 UTC (permalink / raw)
To: Adrian Hunter; +Cc: linuxppc-dev, linux-mtd
Adrian Hunter wrote:
> Felix Radensky wrote:
>> Hi,
>>
>> I have a strange problem in linux-2.6.31 running on MPC8536DS board.
>> It is 100% reproducible, by opening a 350MB tar file into ubifs volume
>> on NAND flash, and starting erase of NOR flash partition right after
>> that.
>>
>> If I don't start NOR erase, everything works fine. Also, If I run
>> sync after
>> tar, no problem occurs. The NOR flash is 32MB Spansion, NAND is
>> 4GB Samsung.
>>
>> The error messages are as follows:
>>
>> UBI error: ubi_io_write: error -5 while writing 2048 bytes to PEB
>> 5812:12288, written 0 bytes
>> UBI warning: ubi_eba_write_leb: failed to write data to PEB 5812
>> UBI: recover PEB 5812, move data to PEB 19400
>> UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB
>> 5812:512, read 512 bytes
>> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB
>> 19400:512, written 0 bytes
>> UBI warning: recover_peb: failed to write to PEB 19400
>> UBI: try again
>> UBI: recover PEB 5812, move data to PEB 19401
>> UBI: run torture test for PEB 19400
>> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB
>> 19401:512, written 0 bytes
>> UBI warning: recover_peb: failed to write to PEB 19401
>> UBI: try again
>> UBI: recover PEB 5812, move data to PEB 19402
>> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB
>> 19402:512, written 0 bytes
>> UBI warning: recover_peb: failed to write to PEB 19402
>> UBI: try again
>> UBI: recover PEB 5812, move data to PEB 19403
>> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB
>> 19403:512, written 0 bytes
>> UBI warning: recover_peb: failed to write to PEB 19403
>> UBI warning: ubi_ro_mode: switch to read-only mode
>> UBIFS error (pid 1149): ubifs_wbuf_write_nolock: cannot write 2522
>> bytes to LEB 389:10240, error -5
>> UBIFS warning (pid 1149): ubifs_ro_mode: switched to read-only mode,
>> error -5
>> UBIFS error (pid 1149): do_writepage: cannot write page 0 of inode
>> 30708, error -5
>> UBIFS error (pid 1149): make_reservation: cannot reserve 858 bytes in
>> jhead 2, error -30
>> UBIFS error (pid 1149): do_writepage: cannot write page 2 of inode
>> 29486, error -30
>> UBIFS error (pid 1149): make_reservation: cannot reserve 721 bytes in
>> jhead 2, error -30
>> UBIFS error (pid 1149): do_writepage: cannot write page 1 of inode
>> 30070, error -30
>> UBI error: ubi_io_write: error -5 while writing 2048 bytes to PEB
>> 5022:88064, written 0 bytes
>> UBI warning: ubi_eba_write_leb: failed to write data to PEB 5022
>> UBI: recover PEB 5022, move data to PEB 19404
>> UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB
>> 5022:512, read 512 bytes
>> UBI error: ubi_io_write: read-only mode
>> UBI warning: recover_peb: failed to write to PEB 19404
>> UBI: try again
>> UBI: recover PEB 5022, move data to PEB 19405
>> UBI error: ubi_io_write: read-only mode
>> UBI warning: recover_peb: failed to write to PEB 19405
>> UBI: try again
>> UBI: recover PEB 5022, move data to PEB 19406
>> UBI error: ubi_io_write: read-only mode
>> UBI warning: recover_peb: failed to write to PEB 19406
>> UBI: try again
>> UBI: recover PEB 5022, move data to PEB 19407
>> UBI error: ubi_io_write: read-only mode
>> UBI warning: recover_peb: failed to write to PEB 19407
>> UBIFS error (pid 1044): ubifs_wbuf_sync_nolock: cannot write 2048
>> bytes to LEB 788:86016
>> UBIFS error (pid 1044): ubifs_bg_wbufs_sync: cannot sync
>> write-buffer, error -30
>> UBIFS warning (pid 1044): ubifs_ro_mode: switched to read-only mode,
>> error -30
>> UBI error: ubi_io_write: error -5 while writing 2048 bytes to PEB
>> 5817:26624, written 0 bytes
>> UBI warning: ubi_eba_write_leb: failed to write data to PEB 5817
>> UBI: recover PEB 5817, move data to PEB 19408
>> UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB
>> 5817:512, read 512 bytes
>> UBI error: ubi_io_write: read-only mode
>> UBI warning: recover_peb: failed to write to PEB 19408
>> UBI: try again
>> UBI: recover PEB 5817, move data to PEB 19409
>> UBI error: ubi_io_write: read-only mode
>> UBI warning: recover_peb: failed to write to PEB 19409
>> UBI: try again
>> UBI: recover PEB 5817, move data to PEB 19410
>> UBI error: ubi_io_write: read-only mode
>> UBI warning: recover_peb: failed to write to PEB 19410
>> UBI: try again
>> UBI: recover PEB 5817, move data to PEB 19411
>> UBI error: ubi_io_write: read-only mode
>> UBI warning: recover_peb: failed to write to PEB 19411
>> UBIFS error (pid 1047): ubifs_wbuf_sync_nolock: cannot write 2048
>> bytes to LEB 385:24576
>> UBIFS error (pid 1047): ubifs_bg_wbufs_sync: cannot sync
>> write-buffer, error -30
>> UBIFS error (pid 1149): make_reservation: cannot reserve 160 bytes in
>> jhead 1, error -30
>> UBIFS error (pid 1149): ubifs_write_inode: can't write inode 30709,
>> error -30
>> UBIFS error (pid 1149): make_reservation: cannot reserve 160 bytes in
>> jhead 1, error -30
>> UBIFS error (pid 1149): ubifs_write_inode: can't write inode 30710,
>> error -30
>> UBIFS error (pid 1149): make_reservation: cannot reserve 160 bytes in
>> jhead 1, error -30
>> UBIFS error (pid 1149): ubifs_write_inode: can't write inode 30698,
>> error -30
>> UBIFS error (pid 1149): make_reservation: cannot reserve 160 bytes in
>> jhead 1, error -30
>> UBIFS error (pid 1149): ubifs_write_inode: can't write inode 30711,
>> error -30
>>
>> I'd appreciate any hints on what can cause this. Is it a hardware
>> problem, mtd layer problem
>> or UBI problem ?
>
> It sounds like you are saying one MTD partition somehow affects another.
> You should check the MTD partitions are set up correctly. Are you using
> tools that make assumptions about which mtd partition is which?
>
> How do you erase the NOR flash? Is the device node (/dev/mtd...)
> correct?
I can also reproduce the problem by reading from NOR, i.e.
dd if=/dev/mtd4 of=/dev/null
Felix.
>
>
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: UBIFS problem on MPC8536DS
2009-10-14 13:21 ` Felix Radensky
@ 2009-10-14 16:44 ` Adrian Hunter
2009-10-14 17:48 ` Felix Radensky
0 siblings, 1 reply; 29+ messages in thread
From: Adrian Hunter @ 2009-10-14 16:44 UTC (permalink / raw)
To: Felix Radensky; +Cc: linuxppc-dev, linux-mtd
Felix Radensky wrote:
> Adrian Hunter wrote:
>> Felix Radensky wrote:
>>> Hi,
>>>
>>> I have a strange problem in linux-2.6.31 running on MPC8536DS board.
>>> It is 100% reproducible, by opening a 350MB tar file into ubifs volume
>>> on NAND flash, and starting erase of NOR flash partition right after
>>> that.
>>>
>>> If I don't start NOR erase, everything works fine. Also, If I run
>>> sync after
>>> tar, no problem occurs. The NOR flash is 32MB Spansion, NAND is
>>> 4GB Samsung.
>>>
>>> The error messages are as follows:
>>>
>>> UBI error: ubi_io_write: error -5 while writing 2048 bytes to PEB
>>> 5812:12288, written 0 bytes
>>> UBI warning: ubi_eba_write_leb: failed to write data to PEB 5812
>>> UBI: recover PEB 5812, move data to PEB 19400
>>> UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB
>>> 5812:512, read 512 bytes
>>> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB
>>> 19400:512, written 0 bytes
>>> UBI warning: recover_peb: failed to write to PEB 19400
>>> UBI: try again
>>> UBI: recover PEB 5812, move data to PEB 19401
>>> UBI: run torture test for PEB 19400
>>> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB
>>> 19401:512, written 0 bytes
>>> UBI warning: recover_peb: failed to write to PEB 19401
>>> UBI: try again
>>> UBI: recover PEB 5812, move data to PEB 19402
>>> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB
>>> 19402:512, written 0 bytes
>>> UBI warning: recover_peb: failed to write to PEB 19402
>>> UBI: try again
>>> UBI: recover PEB 5812, move data to PEB 19403
>>> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB
>>> 19403:512, written 0 bytes
>>> UBI warning: recover_peb: failed to write to PEB 19403
>>> UBI warning: ubi_ro_mode: switch to read-only mode
>>> UBIFS error (pid 1149): ubifs_wbuf_write_nolock: cannot write 2522
>>> bytes to LEB 389:10240, error -5
>>> UBIFS warning (pid 1149): ubifs_ro_mode: switched to read-only mode,
>>> error -5
>>> UBIFS error (pid 1149): do_writepage: cannot write page 0 of inode
>>> 30708, error -5
>>> UBIFS error (pid 1149): make_reservation: cannot reserve 858 bytes in
>>> jhead 2, error -30
>>> UBIFS error (pid 1149): do_writepage: cannot write page 2 of inode
>>> 29486, error -30
>>> UBIFS error (pid 1149): make_reservation: cannot reserve 721 bytes in
>>> jhead 2, error -30
>>> UBIFS error (pid 1149): do_writepage: cannot write page 1 of inode
>>> 30070, error -30
>>> UBI error: ubi_io_write: error -5 while writing 2048 bytes to PEB
>>> 5022:88064, written 0 bytes
>>> UBI warning: ubi_eba_write_leb: failed to write data to PEB 5022
>>> UBI: recover PEB 5022, move data to PEB 19404
>>> UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB
>>> 5022:512, read 512 bytes
>>> UBI error: ubi_io_write: read-only mode
>>> UBI warning: recover_peb: failed to write to PEB 19404
>>> UBI: try again
>>> UBI: recover PEB 5022, move data to PEB 19405
>>> UBI error: ubi_io_write: read-only mode
>>> UBI warning: recover_peb: failed to write to PEB 19405
>>> UBI: try again
>>> UBI: recover PEB 5022, move data to PEB 19406
>>> UBI error: ubi_io_write: read-only mode
>>> UBI warning: recover_peb: failed to write to PEB 19406
>>> UBI: try again
>>> UBI: recover PEB 5022, move data to PEB 19407
>>> UBI error: ubi_io_write: read-only mode
>>> UBI warning: recover_peb: failed to write to PEB 19407
>>> UBIFS error (pid 1044): ubifs_wbuf_sync_nolock: cannot write 2048
>>> bytes to LEB 788:86016
>>> UBIFS error (pid 1044): ubifs_bg_wbufs_sync: cannot sync
>>> write-buffer, error -30
>>> UBIFS warning (pid 1044): ubifs_ro_mode: switched to read-only mode,
>>> error -30
>>> UBI error: ubi_io_write: error -5 while writing 2048 bytes to PEB
>>> 5817:26624, written 0 bytes
>>> UBI warning: ubi_eba_write_leb: failed to write data to PEB 5817
>>> UBI: recover PEB 5817, move data to PEB 19408
>>> UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB
>>> 5817:512, read 512 bytes
>>> UBI error: ubi_io_write: read-only mode
>>> UBI warning: recover_peb: failed to write to PEB 19408
>>> UBI: try again
>>> UBI: recover PEB 5817, move data to PEB 19409
>>> UBI error: ubi_io_write: read-only mode
>>> UBI warning: recover_peb: failed to write to PEB 19409
>>> UBI: try again
>>> UBI: recover PEB 5817, move data to PEB 19410
>>> UBI error: ubi_io_write: read-only mode
>>> UBI warning: recover_peb: failed to write to PEB 19410
>>> UBI: try again
>>> UBI: recover PEB 5817, move data to PEB 19411
>>> UBI error: ubi_io_write: read-only mode
>>> UBI warning: recover_peb: failed to write to PEB 19411
>>> UBIFS error (pid 1047): ubifs_wbuf_sync_nolock: cannot write 2048
>>> bytes to LEB 385:24576
>>> UBIFS error (pid 1047): ubifs_bg_wbufs_sync: cannot sync
>>> write-buffer, error -30
>>> UBIFS error (pid 1149): make_reservation: cannot reserve 160 bytes in
>>> jhead 1, error -30
>>> UBIFS error (pid 1149): ubifs_write_inode: can't write inode 30709,
>>> error -30
>>> UBIFS error (pid 1149): make_reservation: cannot reserve 160 bytes in
>>> jhead 1, error -30
>>> UBIFS error (pid 1149): ubifs_write_inode: can't write inode 30710,
>>> error -30
>>> UBIFS error (pid 1149): make_reservation: cannot reserve 160 bytes in
>>> jhead 1, error -30
>>> UBIFS error (pid 1149): ubifs_write_inode: can't write inode 30698,
>>> error -30
>>> UBIFS error (pid 1149): make_reservation: cannot reserve 160 bytes in
>>> jhead 1, error -30
>>> UBIFS error (pid 1149): ubifs_write_inode: can't write inode 30711,
>>> error -30
>>>
>>> I'd appreciate any hints on what can cause this. Is it a hardware
>>> problem, mtd layer problem
>>> or UBI problem ?
>> It sounds like you are saying one MTD partition somehow affects another.
>> You should check the MTD partitions are set up correctly. Are you using
>> tools that make assumptions about which mtd partition is which?
>>
>> How do you erase the NOR flash? Is the device node (/dev/mtd...)
>> correct?
> I can also reproduce the problem by reading from NOR, i.e.
>
> dd if=/dev/mtd4 of=/dev/null
I doubt the problem is in UBI or UBIFS, and plenty of people use multiple
MTD partitions with no problem.
Do the NAND and NOR use the same memory controller?
I don't think I can be much help I'm afraid.
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: UBIFS problem on MPC8536DS
2009-10-14 16:44 ` Adrian Hunter
@ 2009-10-14 17:48 ` Felix Radensky
2009-10-14 18:13 ` Scott Wood
0 siblings, 1 reply; 29+ messages in thread
From: Felix Radensky @ 2009-10-14 17:48 UTC (permalink / raw)
To: Adrian Hunter; +Cc: linuxppc-dev, linux-mtd
Adrian Hunter wrote:
> Felix Radensky wrote:
>> Adrian Hunter wrote:
>>> Felix Radensky wrote:
>>>> Hi,
>>>>
>>>> I have a strange problem in linux-2.6.31 running on MPC8536DS board.
>>>> It is 100% reproducible, by opening a 350MB tar file into ubifs volume
>>>> on NAND flash, and starting erase of NOR flash partition right after
>>>> that.
>>>>
>>>> If I don't start NOR erase, everything works fine. Also, If I run
>>>> sync after
>>>> tar, no problem occurs. The NOR flash is 32MB Spansion, NAND is
>>>> 4GB Samsung.
>>>>
>>>> The error messages are as follows:
>>>>
>>>> UBI error: ubi_io_write: error -5 while writing 2048 bytes to PEB
>>>> 5812:12288, written 0 bytes
>>>> UBI warning: ubi_eba_write_leb: failed to write data to PEB 5812
>>>> UBI: recover PEB 5812, move data to PEB 19400
>>>> UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB
>>>> 5812:512, read 512 bytes
>>>> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB
>>>> 19400:512, written 0 bytes
>>>> UBI warning: recover_peb: failed to write to PEB 19400
>>>> UBI: try again
>>>> UBI: recover PEB 5812, move data to PEB 19401
>>>> UBI: run torture test for PEB 19400
>>>> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB
>>>> 19401:512, written 0 bytes
>>>> UBI warning: recover_peb: failed to write to PEB 19401
>>>> UBI: try again
>>>> UBI: recover PEB 5812, move data to PEB 19402
>>>> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB
>>>> 19402:512, written 0 bytes
>>>> UBI warning: recover_peb: failed to write to PEB 19402
>>>> UBI: try again
>>>> UBI: recover PEB 5812, move data to PEB 19403
>>>> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB
>>>> 19403:512, written 0 bytes
>>>> UBI warning: recover_peb: failed to write to PEB 19403
>>>> UBI warning: ubi_ro_mode: switch to read-only mode
>>>> UBIFS error (pid 1149): ubifs_wbuf_write_nolock: cannot write 2522
>>>> bytes to LEB 389:10240, error -5
>>>> UBIFS warning (pid 1149): ubifs_ro_mode: switched to read-only mode,
>>>> error -5
>>>> UBIFS error (pid 1149): do_writepage: cannot write page 0 of inode
>>>> 30708, error -5
>>>> UBIFS error (pid 1149): make_reservation: cannot reserve 858 bytes
>>>> in jhead 2, error -30
>>>> UBIFS error (pid 1149): do_writepage: cannot write page 2 of inode
>>>> 29486, error -30
>>>> UBIFS error (pid 1149): make_reservation: cannot reserve 721 bytes
>>>> in jhead 2, error -30
>>>> UBIFS error (pid 1149): do_writepage: cannot write page 1 of inode
>>>> 30070, error -30
>>>> UBI error: ubi_io_write: error -5 while writing 2048 bytes to PEB
>>>> 5022:88064, written 0 bytes
>>>> UBI warning: ubi_eba_write_leb: failed to write data to PEB 5022
>>>> UBI: recover PEB 5022, move data to PEB 19404
>>>> UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB
>>>> 5022:512, read 512 bytes
>>>> UBI error: ubi_io_write: read-only mode
>>>> UBI warning: recover_peb: failed to write to PEB 19404
>>>> UBI: try again
>>>> UBI: recover PEB 5022, move data to PEB 19405
>>>> UBI error: ubi_io_write: read-only mode
>>>> UBI warning: recover_peb: failed to write to PEB 19405
>>>> UBI: try again
>>>> UBI: recover PEB 5022, move data to PEB 19406
>>>> UBI error: ubi_io_write: read-only mode
>>>> UBI warning: recover_peb: failed to write to PEB 19406
>>>> UBI: try again
>>>> UBI: recover PEB 5022, move data to PEB 19407
>>>> UBI error: ubi_io_write: read-only mode
>>>> UBI warning: recover_peb: failed to write to PEB 19407
>>>> UBIFS error (pid 1044): ubifs_wbuf_sync_nolock: cannot write 2048
>>>> bytes to LEB 788:86016
>>>> UBIFS error (pid 1044): ubifs_bg_wbufs_sync: cannot sync
>>>> write-buffer, error -30
>>>> UBIFS warning (pid 1044): ubifs_ro_mode: switched to read-only mode,
>>>> error -30
>>>> UBI error: ubi_io_write: error -5 while writing 2048 bytes to PEB
>>>> 5817:26624, written 0 bytes
>>>> UBI warning: ubi_eba_write_leb: failed to write data to PEB 5817
>>>> UBI: recover PEB 5817, move data to PEB 19408
>>>> UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB
>>>> 5817:512, read 512 bytes
>>>> UBI error: ubi_io_write: read-only mode
>>>> UBI warning: recover_peb: failed to write to PEB 19408
>>>> UBI: try again
>>>> UBI: recover PEB 5817, move data to PEB 19409
>>>> UBI error: ubi_io_write: read-only mode
>>>> UBI warning: recover_peb: failed to write to PEB 19409
>>>> UBI: try again
>>>> UBI: recover PEB 5817, move data to PEB 19410
>>>> UBI error: ubi_io_write: read-only mode
>>>> UBI warning: recover_peb: failed to write to PEB 19410
>>>> UBI: try again
>>>> UBI: recover PEB 5817, move data to PEB 19411
>>>> UBI error: ubi_io_write: read-only mode
>>>> UBI warning: recover_peb: failed to write to PEB 19411
>>>> UBIFS error (pid 1047): ubifs_wbuf_sync_nolock: cannot write 2048
>>>> bytes to LEB 385:24576
>>>> UBIFS error (pid 1047): ubifs_bg_wbufs_sync: cannot sync
>>>> write-buffer, error -30
>>>> UBIFS error (pid 1149): make_reservation: cannot reserve 160 bytes
>>>> in jhead 1, error -30
>>>> UBIFS error (pid 1149): ubifs_write_inode: can't write inode 30709,
>>>> error -30
>>>> UBIFS error (pid 1149): make_reservation: cannot reserve 160 bytes
>>>> in jhead 1, error -30
>>>> UBIFS error (pid 1149): ubifs_write_inode: can't write inode 30710,
>>>> error -30
>>>> UBIFS error (pid 1149): make_reservation: cannot reserve 160 bytes
>>>> in jhead 1, error -30
>>>> UBIFS error (pid 1149): ubifs_write_inode: can't write inode 30698,
>>>> error -30
>>>> UBIFS error (pid 1149): make_reservation: cannot reserve 160 bytes
>>>> in jhead 1, error -30
>>>> UBIFS error (pid 1149): ubifs_write_inode: can't write inode 30711,
>>>> error -30
>>>>
>>>> I'd appreciate any hints on what can cause this. Is it a hardware
>>>> problem, mtd layer problem
>>>> or UBI problem ?
>>> It sounds like you are saying one MTD partition somehow affects another.
>>> You should check the MTD partitions are set up correctly. Are you using
>>> tools that make assumptions about which mtd partition is which?
>>>
>>> How do you erase the NOR flash? Is the device node (/dev/mtd...)
>>> correct?
>> I can also reproduce the problem by reading from NOR, i.e.
>>
>> dd if=/dev/mtd4 of=/dev/null
>
> I doubt the problem is in UBI or UBIFS, and plenty of people use multiple
> MTD partitions with no problem.
>
> Do the NAND and NOR use the same memory controller?
>
> I don't think I can be much help I'm afraid.
>
Yes, NAND and NOR are on the same local bus controller.
Maybe powerpc folks can provide some insight here.
Is it possible that simultaneous access to NOR and NAND
on MPC8536 can result in NAND timeouts ?
Felix.
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: UBIFS problem on MPC8536DS
2009-10-14 17:48 ` Felix Radensky
@ 2009-10-14 18:13 ` Scott Wood
2009-10-14 20:12 ` Felix Radensky
2009-10-15 20:07 ` Scott Wood
0 siblings, 2 replies; 29+ messages in thread
From: Scott Wood @ 2009-10-14 18:13 UTC (permalink / raw)
To: Felix Radensky; +Cc: linuxppc-dev, linux-mtd, Adrian Hunter
Felix Radensky wrote:
> Yes, NAND and NOR are on the same local bus controller.
>
> Maybe powerpc folks can provide some insight here.
> Is it possible that simultaneous access to NOR and NAND
> on MPC8536 can result in NAND timeouts ?
I've heard other reports of such problems with eLBC, but was unable to
reproduce it myself last time I tried. Could you reduce this down to a
minimal set of specific reproduction instructions (e.g. eliminate UBI if
possible, or else explain how to set up UBI)?
-Scott
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: UBIFS problem on MPC8536DS
2009-10-14 18:13 ` Scott Wood
@ 2009-10-14 20:12 ` Felix Radensky
2009-10-15 20:07 ` Scott Wood
1 sibling, 0 replies; 29+ messages in thread
From: Felix Radensky @ 2009-10-14 20:12 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev, linux-mtd, Adrian Hunter
Hi, Scott
Scott Wood wrote:
> Felix Radensky wrote:
>> Yes, NAND and NOR are on the same local bus controller.
>>
>> Maybe powerpc folks can provide some insight here.
>> Is it possible that simultaneous access to NOR and NAND
>> on MPC8536 can result in NAND timeouts ?
>
> I've heard other reports of such problems with eLBC, but was unable to
> reproduce it myself last time I tried. Could you reduce this down to
> a minimal set of specific reproduction instructions (e.g. eliminate
> UBI if possible, or else explain how to set up UBI)?
>
> -Scott
>
I use u-boot-2009.08 and linux-2.6.31 compiled with ELDK 4.2
UBI (under Device Drivers->MTD->UBI) and UBIFS
(under File Systems->Miscellaneous filesystems) should be enabled
in kernel configuration. I use the following configuration options
(default ones):
CONFIG_MTD_UBI=y
CONFIG_MTD_UBI_WL_THRESHOLD=4096
CONFIG_MTD_UBI_BEB_RESERVE=1
# CONFIG_MTD_UBI_GLUEBI is not set
# UBI debugging options
# CONFIG_MTD_UBI_DEBUG is not set
# CONFIG_JFFS2_RUBIN is not set
CONFIG_UBIFS_FS=y
# CONFIG_UBIFS_FS_XATTR is not set
# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
CONFIG_UBIFS_FS_LZO=y
CONFIG_UBIFS_FS_ZLIB=y
# CONFIG_UBIFS_FS_DEBUG is not set
Root file system is mounted over NFS (also ELDK 4.2). udev is not used.
mtd-utils (which include ubi tools) are from latest
git://git.infradead.org/mtd-utils.git
I've added the following eLBC node to mpc8536ds.dts
localbus@ffe05000 {
#address-cells = <2>;
#size-cells = <1>;
compatible = "fsl,mpc8536-elbc", "fsl,elbc", "simple-bus";
reg = <0xffe05000 0x1000>;
interrupts = <19 2>;
interrupt-parent = <&mpic>;
ranges = <0x0 0x0 0xe8000000 0x08000000
0x1 0x0 0xe8000000 0x08000000
0x2 0x0 0xffa00000 0x00040000
0x3 0x0 0xffdf0000 0x00008000
0x4 0x0 0xffa40000 0x00040000
0x5 0x0 0xffa80000 0x00040000
0x6 0x0 0xffac0000 0x00040000>;
nor@0,0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "cfi-flash";
reg = <0x0 0x0 0x8000000>;
bank-width = <2>;
device-width = <1>;
partition@0 {
label = "ramdisk";
reg = <0x0 0x03000000>;
read-only;
};
partition@3000000 {
label = "diagnostics";
reg = <0x03000000 0x00e00000>;
read-only;
};
partition@3e00000 {
label = "dink";
reg = <0x03e00000 0x00200000>;
read-only;
};
partition@4000000 {
label = "kernel";
reg = <0x04000000 0x00400000>;
read-only;
};
partition@4400000 {
label = "jffs2";
reg = <0x04400000 0x03b00000>;
};
partition@7f00000 {
label = "dtb";
reg = <0x07f00000 0x00080000>;
read-only;
};
partition@7f80000 {
label = "u-boot";
reg = <0x07f80000 0x00080000>;
read-only;
};
};
nand@2,0 {
compatible = "fsl,mpc8536-fcm-nand",
"fsl,elbc-fcm-nand";
reg = <0x2 0x0 0x40000>;
};
nand@4,0 {
compatible = "fsl,mpc8536-fcm-nand",
"fsl,elbc-fcm-nand";
reg = <0x4 0x0 0x40000>;
};
nand@5,0 {
compatible = "fsl,mpc8536-fcm-nand",
"fsl,elbc-fcm-nand";
reg = <0x5 0x0 0x40000>;
};
nand@6,0 {
compatible = "fsl,mpc8536-fcm-nand",
"fsl,elbc-fcm-nand";
reg = <0x6 0x0 0x40000>;
};
board-control@3,0 {
compatible = "fsl,mpc8536ds-fpga-pixis";
reg = <0x3 0x0 0x8000>;
};
};
I use the script below to reproduce the problem. rfs.tar.bz2 is 350MiB.
nand_dev=mtd7
nand_num=7
nor_dev=mtd4
flash_eraseall /dev/$nand_dev || exit 1
ubiformat /dev/$nand_dev || exit 1
ubictrl_major=`cat /sys/class/misc/ubi_ctrl/dev | cut -d: -f1`
ubictrl_minor=`cat /sys/class/misc/ubi_ctrl/dev | cut -d: -f2`
rm -f /dev/ubi_ctrl
mknod /dev/ubi_ctrl c $ubictrl_major $ubictrl_minor
ubiattach /dev/ubi_ctrl -m $nand_num || exit 1
ubi0_major=`cat /sys/class/ubi/ubi0/dev | cut -d: -f1`
ubi0_minor=`cat /sys/class/ubi/ubi0/dev | cut -d: -f2`
rm -f /dev/ubi0
mknod /dev/ubi0 c $ubi0_major $ubi0_minor
ubimkvol /dev/ubi0 -N rootfs -s 800MiB || exit 1
mkdir /mnt/rfs
mount -t ubifs ubi0:rootfs /mnt/rfs || exit 1
tar xf /root/rfs.tar.bz2 -C /mnt/rfs
flash_eraseall /dev/$nor_dev || exit 1
Felix.
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: UBIFS problem on MPC8536DS
2009-10-14 10:54 UBIFS problem on MPC8536DS Felix Radensky
2009-10-14 12:36 ` Adrian Hunter
@ 2009-10-15 9:54 ` Norbert van Bolhuis
2009-10-15 10:45 ` MPC5121 CAN and USB Kári Davíðsson
2009-10-15 12:49 ` UBIFS problem on MPC8536DS Felix Radensky
1 sibling, 2 replies; 29+ messages in thread
From: Norbert van Bolhuis @ 2009-10-15 9:54 UTC (permalink / raw)
To: Felix Radensky; +Cc: linuxppc-dev, linux-mtd
Hi Felix,
do you have CONFIG_NO_HZ defined ?
I've seen similar problems with powerpc + CONFIG_NO_HZ. In my case the low-level
do_write_buffer (cfi_cmdset_0002.c) timed out too early. See
http://lkml.org/lkml/2009/9/3/84
Maybe in your case it's the do_erase_chip timing out too early.
---
NvBolhuis.
Felix Radensky wrote:
> Hi,
>
> I have a strange problem in linux-2.6.31 running on MPC8536DS board.
> It is 100% reproducible, by opening a 350MB tar file into ubifs volume
> on NAND flash, and starting erase of NOR flash partition right after that.
>
> If I don't start NOR erase, everything works fine. Also, If I run sync
> after
> tar, no problem occurs. The NOR flash is 32MB Spansion, NAND is
> 4GB Samsung.
>
> The error messages are as follows:
>
> UBI error: ubi_io_write: error -5 while writing 2048 bytes to PEB
> 5812:12288, written 0 bytes
> UBI warning: ubi_eba_write_leb: failed to write data to PEB 5812
> UBI: recover PEB 5812, move data to PEB 19400
> UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB
> 5812:512, read 512 bytes
> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB
> 19400:512, written 0 bytes
> UBI warning: recover_peb: failed to write to PEB 19400
> UBI: try again
> UBI: recover PEB 5812, move data to PEB 19401
> UBI: run torture test for PEB 19400
> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB
> 19401:512, written 0 bytes
> UBI warning: recover_peb: failed to write to PEB 19401
> UBI: try again
> UBI: recover PEB 5812, move data to PEB 19402
> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB
> 19402:512, written 0 bytes
> UBI warning: recover_peb: failed to write to PEB 19402
> UBI: try again
> UBI: recover PEB 5812, move data to PEB 19403
> UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB
> 19403:512, written 0 bytes
> UBI warning: recover_peb: failed to write to PEB 19403
> UBI warning: ubi_ro_mode: switch to read-only mode
> UBIFS error (pid 1149): ubifs_wbuf_write_nolock: cannot write 2522 bytes
> to LEB 389:10240, error -5
> UBIFS warning (pid 1149): ubifs_ro_mode: switched to read-only mode,
> error -5
> UBIFS error (pid 1149): do_writepage: cannot write page 0 of inode
> 30708, error -5
> UBIFS error (pid 1149): make_reservation: cannot reserve 858 bytes in
> jhead 2, error -30
> UBIFS error (pid 1149): do_writepage: cannot write page 2 of inode
> 29486, error -30
> UBIFS error (pid 1149): make_reservation: cannot reserve 721 bytes in
> jhead 2, error -30
> UBIFS error (pid 1149): do_writepage: cannot write page 1 of inode
> 30070, error -30
> UBI error: ubi_io_write: error -5 while writing 2048 bytes to PEB
> 5022:88064, written 0 bytes
> UBI warning: ubi_eba_write_leb: failed to write data to PEB 5022
> UBI: recover PEB 5022, move data to PEB 19404
> UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB
> 5022:512, read 512 bytes
> UBI error: ubi_io_write: read-only mode
> UBI warning: recover_peb: failed to write to PEB 19404
> UBI: try again
> UBI: recover PEB 5022, move data to PEB 19405
> UBI error: ubi_io_write: read-only mode
> UBI warning: recover_peb: failed to write to PEB 19405
> UBI: try again
> UBI: recover PEB 5022, move data to PEB 19406
> UBI error: ubi_io_write: read-only mode
> UBI warning: recover_peb: failed to write to PEB 19406
> UBI: try again
> UBI: recover PEB 5022, move data to PEB 19407
> UBI error: ubi_io_write: read-only mode
> UBI warning: recover_peb: failed to write to PEB 19407
> UBIFS error (pid 1044): ubifs_wbuf_sync_nolock: cannot write 2048 bytes
> to LEB 788:86016
> UBIFS error (pid 1044): ubifs_bg_wbufs_sync: cannot sync write-buffer,
> error -30
> UBIFS warning (pid 1044): ubifs_ro_mode: switched to read-only mode,
> error -30
> UBI error: ubi_io_write: error -5 while writing 2048 bytes to PEB
> 5817:26624, written 0 bytes
> UBI warning: ubi_eba_write_leb: failed to write data to PEB 5817
> UBI: recover PEB 5817, move data to PEB 19408
> UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB
> 5817:512, read 512 bytes
> UBI error: ubi_io_write: read-only mode
> UBI warning: recover_peb: failed to write to PEB 19408
> UBI: try again
> UBI: recover PEB 5817, move data to PEB 19409
> UBI error: ubi_io_write: read-only mode
> UBI warning: recover_peb: failed to write to PEB 19409
> UBI: try again
> UBI: recover PEB 5817, move data to PEB 19410
> UBI error: ubi_io_write: read-only mode
> UBI warning: recover_peb: failed to write to PEB 19410
> UBI: try again
> UBI: recover PEB 5817, move data to PEB 19411
> UBI error: ubi_io_write: read-only mode
> UBI warning: recover_peb: failed to write to PEB 19411
> UBIFS error (pid 1047): ubifs_wbuf_sync_nolock: cannot write 2048 bytes
> to LEB 385:24576
> UBIFS error (pid 1047): ubifs_bg_wbufs_sync: cannot sync write-buffer,
> error -30
> UBIFS error (pid 1149): make_reservation: cannot reserve 160 bytes in
> jhead 1, error -30
> UBIFS error (pid 1149): ubifs_write_inode: can't write inode 30709,
> error -30
> UBIFS error (pid 1149): make_reservation: cannot reserve 160 bytes in
> jhead 1, error -30
> UBIFS error (pid 1149): ubifs_write_inode: can't write inode 30710,
> error -30
> UBIFS error (pid 1149): make_reservation: cannot reserve 160 bytes in
> jhead 1, error -30
> UBIFS error (pid 1149): ubifs_write_inode: can't write inode 30698,
> error -30
> UBIFS error (pid 1149): make_reservation: cannot reserve 160 bytes in
> jhead 1, error -30
> UBIFS error (pid 1149): ubifs_write_inode: can't write inode 30711,
> error -30
>
> I'd appreciate any hints on what can cause this. Is it a hardware
> problem, mtd layer problem
> or UBI problem ?
>
> Thanks a lot in advance.
>
> Felix.
>
>
>
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
>
^ permalink raw reply [flat|nested] 29+ messages in thread
* MPC5121 CAN and USB
2009-10-15 9:54 ` Norbert van Bolhuis
@ 2009-10-15 10:45 ` Kári Davíðsson
2009-10-15 11:20 ` Paul Gibson
2009-10-15 12:49 ` UBIFS problem on MPC8536DS Felix Radensky
1 sibling, 1 reply; 29+ messages in thread
From: Kári Davíðsson @ 2009-10-15 10:45 UTC (permalink / raw)
To: linuxppc-dev
Hello,
Where is the most current linux work for the Freescale MPC5121 cpu stored.
What I am specifically interested in at this time is the CAN and USB subsystems.
rg
kd
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: MPC5121 CAN and USB
2009-10-15 10:45 ` MPC5121 CAN and USB Kári Davíðsson
@ 2009-10-15 11:20 ` Paul Gibson
2009-10-15 11:36 ` Kári Davíðsson
0 siblings, 1 reply; 29+ messages in thread
From: Paul Gibson @ 2009-10-15 11:20 UTC (permalink / raw)
Cc: linuxppc-dev
In my opinion the best place is the BSP available on the MPC5121e page
on the Freescale site.
I actually use the kernel in the git repository here which is similar to
the BSP:
http://git.denx.de/?p=linux-2.6-denx.git;a=shortlog;h=refs/heads/ltib-mpc5121ads-20090602
or here:
http://git.denx.de/?p=linux-mpc512x.git;a=summary
I have found both to be very stable, also with the CAN and USB.
Paul
Kári Davíðsson wrote:
> Hello,
>
> Where is the most current linux work for the Freescale MPC5121 cpu
> stored.
> What I am specifically interested in at this time is the CAN and USB
> subsystems.
>
> rg
> kd
>
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
>
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: MPC5121 CAN and USB
2009-10-15 11:20 ` Paul Gibson
@ 2009-10-15 11:36 ` Kári Davíðsson
2009-10-15 18:30 ` Wolfgang Denk
0 siblings, 1 reply; 29+ messages in thread
From: Kári Davíðsson @ 2009-10-15 11:36 UTC (permalink / raw)
To: paul.gibson2074; +Cc: linuxppc-dev
Thank you Paul,
The kernel from the BSP on Freescale site is crashing on the CAN in my case=
(might be a hardware bug).
I could not find the source for the kernel in the BSP or on the freescale s=
ite.
I had not looked at http://git.denx.de/?p=3Dlinux-2.6-denx.git;a=3Dshortlog=
;h=3Drefs/heads/ltib-mpc5121ads-20090602
I am now in the progress of cloning the linux-mpc512x git from denx and bui=
lding from it.
Hopefully that will help me.
rg
kd
Paul Gibson wrote:
> In my opinion the best place is the BSP available on the MPC5121e page=20
> on the Freescale site.
>=20
> I actually use the kernel in the git repository here which is similar to=
=20
> the BSP:
> http://git.denx.de/?p=3Dlinux-2.6-denx.git;a=3Dshortlog;h=3Drefs/heads/lt=
ib-mpc5121ads-20090602=20
> or here:
> http://git.denx.de/?p=3Dlinux-mpc512x.git;a=3Dsummary
>=20
> I have found both to be very stable, also with the CAN and USB.
>=20
> Paul
>=20
> K=E1ri Dav=ED=F0sson wrote:
>> Hello,
>>
>> Where is the most current linux work for the Freescale MPC5121 cpu=20
>> stored.
>> What I am specifically interested in at this time is the CAN and USB=20
>> subsystems.
>>
>> rg
>> kd
>>
>>
>> _______________________________________________
>> Linuxppc-dev mailing list
>> Linuxppc-dev@lists.ozlabs.org
>> https://lists.ozlabs.org/listinfo/linuxppc-dev
>>
>=20
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
>=20
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: UBIFS problem on MPC8536DS
2009-10-15 9:54 ` Norbert van Bolhuis
2009-10-15 10:45 ` MPC5121 CAN and USB Kári Davíðsson
@ 2009-10-15 12:49 ` Felix Radensky
1 sibling, 0 replies; 29+ messages in thread
From: Felix Radensky @ 2009-10-15 12:49 UTC (permalink / raw)
To: Norbert van Bolhuis; +Cc: linuxppc-dev, linux-mtd
Hi, Norbert
Norbert van Bolhuis wrote:
> Hi Felix,
>
> do you have CONFIG_NO_HZ defined ?
>
> I've seen similar problems with powerpc + CONFIG_NO_HZ. In my case the
> low-level
> do_write_buffer (cfi_cmdset_0002.c) timed out too early. See
> http://lkml.org/lkml/2009/9/3/84
>
> Maybe in your case it's the do_erase_chip timing out too early.
>
> ---
> NvBolhuis.
>
Thanks for suggestion.
I have CONFIG_NO_HZ defined, but disabling it doesn't help.
I my case timeouts occur in NAND driver, fsl_elbc_nand.c
Felix.
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: MPC5121 CAN and USB
2009-10-15 11:36 ` Kári Davíðsson
@ 2009-10-15 18:30 ` Wolfgang Denk
2009-10-15 23:03 ` Paul Gibson
2009-10-16 13:53 ` Kári Davíðsson
0 siblings, 2 replies; 29+ messages in thread
From: Wolfgang Denk @ 2009-10-15 18:30 UTC (permalink / raw)
To: Kári Davíðsson; +Cc: linuxppc-dev, paul.gibson2074
Dear =?ISO-8859-1?Q?K=E1ri_Dav=ED=F0sson?=,
In message <4AD70927.3030401@marel.com> you wrote:
>
> The kernel from the BSP on Freescale site is crashing on the CAN in my case
> (might be a hardware bug).
I don;t think so. There are some problems in this code, for example
the clocks seem to be wrong. Not toi menthin that the whole code is
hoplessly old and without chance of ever being merged into mainline.
> I could not find the source for the kernel in the BSP or on the freescale site.
Extracting just the sources from LTIB (without actually building all
of it) is indeed not exactly easy.
> I had not looked at http://git.denx.de/?p=linux-2.6-denx.git;a=shortlog;h=refs/heads/ltib-mpc5121ads-20090602
Be careful. There are several branches that are intended for reference
only, or reflect work in progress. These are usually not intended for
use real use in a project:
The "ltib-mpc5121ads-20090602" branch reflects the exact state of the
kernel contained in the LTIB with this name (dated July 2009, despite
the name; based at 2.6.24.6, i. e. 7+ kernel versions behind).
The "mpc512x" branch contains a much smaller subset of drivers, but is
based on a more recent kernel tree (2.6.31-rc5) and is the base of our
(currently dozing) attempts to push this code into mainline.
> I am now in the progress of cloning the linux-mpc512x git from denx and building from it.
> Hopefully that will help me.
Do not do this. This old repository was intended for co-operation
with John Rigby, when he was still working for Freescale. It is a
dead end and totally unsupported. Guess I should remove it. Indeed.
Removed now. Sorry for the confusion.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Anyone who knows history, particularly the history of Europe, will, I
think, recognize that the domination of education or of government by
any one particular religious faith is never a happy arrangement for
the people. - Eleanor Roosevelt
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: UBIFS problem on MPC8536DS
2009-10-14 18:13 ` Scott Wood
2009-10-14 20:12 ` Felix Radensky
@ 2009-10-15 20:07 ` Scott Wood
2009-10-16 5:01 ` Felix Radensky
1 sibling, 1 reply; 29+ messages in thread
From: Scott Wood @ 2009-10-15 20:07 UTC (permalink / raw)
To: Felix Radensky; +Cc: linuxppc-dev, linux-mtd, Adrian Hunter
Scott Wood wrote:
> Felix Radensky wrote:
>> Yes, NAND and NOR are on the same local bus controller.
>>
>> Maybe powerpc folks can provide some insight here.
>> Is it possible that simultaneous access to NOR and NAND
>> on MPC8536 can result in NAND timeouts ?
>
> I've heard other reports of such problems with eLBC, but was unable to
> reproduce it myself last time I tried. Could you reduce this down to a
> minimal set of specific reproduction instructions (e.g. eliminate UBI if
> possible, or else explain how to set up UBI)?
OK, I was able to reproduce the problem on mpc8572 simply by sticking a
read to NOR flash inside fsl_elbc_run_command -- I'm not sure what
happened last time I tried.
I suppose we'll need a special NOR mapping driver that does some sync
with the NAND driver.
-Scott
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: MPC5121 CAN and USB
2009-10-15 18:30 ` Wolfgang Denk
@ 2009-10-15 23:03 ` Paul Gibson
2009-10-15 23:10 ` Wolfgang Denk
2009-10-16 13:53 ` Kári Davíðsson
1 sibling, 1 reply; 29+ messages in thread
From: Paul Gibson @ 2009-10-15 23:03 UTC (permalink / raw)
To: Wolfgang Denk; +Cc: Kári Davíðsson, linuxppc-dev
>> The kernel from the BSP on Freescale site is crashing on the CAN in my c=
ase
>> =A0(might be a hardware bug).
>
> I don;t think so. There are some problems in this code, for example
> the clocks seem to be wrong. Not toi menthin that the whole code is
> hoplessly old and without chance of ever being merged into mainline.
The clocks are definitely wrong, but should not cause the crashing.
The only fix I needed for the ADS512101 board was to set the clock to
66MHz, instead of 100MHz in drivers/can/mscan/mscan.c:
clk->rate =3D 66000000;
Its a hack I know.
> The "ltib-mpc5121ads-20090602" branch reflects the exact state of the
> kernel contained in the LTIB with this name (dated July 2009, despite
> the name; based at 2.6.24.6, i. e. 7+ kernel versions behind).
I have diff'ed this and it is very similar to the ltib in the BSP.
The MBX patches may be missing though. These patches can be obtained
via the Freescale SDK for the OpenGL on the MPC5121e webpage.
Paul
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: MPC5121 CAN and USB
2009-10-15 23:03 ` Paul Gibson
@ 2009-10-15 23:10 ` Wolfgang Denk
2009-10-19 6:46 ` David Jander
0 siblings, 1 reply; 29+ messages in thread
From: Wolfgang Denk @ 2009-10-15 23:10 UTC (permalink / raw)
To: Paul Gibson; +Cc: Kári Davíðsson, linuxppc-dev
Dear Paul,
In message <26b052040910151603y8fc9b00g678d6a873083f1e7@mail.gmail.com> you wrote:
>
> > The "ltib-mpc5121ads-20090602" branch reflects the exact state of the
> > kernel contained in the LTIB with this name (dated July 2009, despite
> > the name; based at 2.6.24.6, i. e. 7+ kernel versions behind).
>
> I have diff'ed this and it is very similar to the ltib in the BSP.
> The MBX patches may be missing though. These patches can be obtained
> via the Freescale SDK for the OpenGL on the MPC5121e webpage.
Who cares. This code is about 8 (!) kernel releases behind. Scrap
it.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Were there fewer fools, knaves would starve. - Anonymous
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: UBIFS problem on MPC8536DS
2009-10-15 20:07 ` Scott Wood
@ 2009-10-16 5:01 ` Felix Radensky
2009-10-16 15:31 ` Scott Wood
0 siblings, 1 reply; 29+ messages in thread
From: Felix Radensky @ 2009-10-16 5:01 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev, linux-mtd, Adrian Hunter
Hi, Scott
Scott Wood wrote:
> Scott Wood wrote:
>> Felix Radensky wrote:
>>> Yes, NAND and NOR are on the same local bus controller.
>>>
>>> Maybe powerpc folks can provide some insight here.
>>> Is it possible that simultaneous access to NOR and NAND
>>> on MPC8536 can result in NAND timeouts ?
>>
>> I've heard other reports of such problems with eLBC, but was unable to
>> reproduce it myself last time I tried. Could you reduce this down to
>> a minimal set of specific reproduction instructions (e.g. eliminate
>> UBI if possible, or else explain how to set up UBI)?
>
> OK, I was able to reproduce the problem on mpc8572 simply by sticking a
> read to NOR flash inside fsl_elbc_run_command -- I'm not sure what
> happened last time I tried.
>
> I suppose we'll need a special NOR mapping driver that does some sync
> with the NAND driver.
>
>
Thanks for confirmation. So the real problem is eLBC ?
What happens if I access other devices on eLBC (e.g. FPGA)
simultaneously with NAND or NOR ?
Felix.
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: MPC5121 CAN and USB
2009-10-15 18:30 ` Wolfgang Denk
2009-10-15 23:03 ` Paul Gibson
@ 2009-10-16 13:53 ` Kári Davíðsson
1 sibling, 0 replies; 29+ messages in thread
From: Kári Davíðsson @ 2009-10-16 13:53 UTC (permalink / raw)
To: Wolfgang Denk; +Cc: linuxppc-dev, paul.gibson2074
Hello,
Wolfgang Denk wrote:
> Dear =?ISO-8859-1?Q?K=E1ri_Dav=ED=F0sson?=,
>
> In message <4AD70927.3030401@marel.com> you wrote:
>> The kernel from the BSP on Freescale site is crashing on the CAN in my case
>> (might be a hardware bug).
>
> I don;t think so. There are some problems in this code, for example
> the clocks seem to be wrong. Not toi menthin that the whole code is
> hoplessly old and without chance of ever being merged into mainline.
Indeed. I had to disable the follwing clock stuff to prevent crashing. I am
running on Rev 3 chip.
diff --git a/drivers/net/can/mscan/mpc52xx_can.c b/drivers/net/can/mscan/mpc52xx_can.c
index e1d78b9..55def57 100644
--- a/drivers/net/can/mscan/mpc52xx_can.c
+++ b/drivers/net/can/mscan/mpc52xx_can.c
@@ -104,8 +104,8 @@ static int __devinit mpc52xx_can_probe(struct platform_device *pdev)
port_clk = clk_get(NULL, clk_name);
/* update clock rate for mpc5121e rev2 chip */
- if (port_clk)
- pdata->clock_frq = clk_get_rate(port_clk);
+// if (port_clk)
+// pdata->clock_frq = clk_get_rate(port_clk);
/* enable clock for mscan module */
clk_enable(mscan_clk);
>
>> I could not find the source for the kernel in the BSP or on the freescale site.
>
> Extracting just the sources from LTIB (without actually building all
> of it) is indeed not exactly easy.
>
>> I had not looked at http://git.denx.de/?p=linux-2.6-denx.git;a=shortlog;h=refs/heads/ltib-mpc5121ads-20090602
>
> Be careful. There are several branches that are intended for reference
> only, or reflect work in progress. These are usually not intended for
> use real use in a project:
>
> The "ltib-mpc5121ads-20090602" branch reflects the exact state of the
> kernel contained in the LTIB with this name (dated July 2009, despite
> the name; based at 2.6.24.6, i. e. 7+ kernel versions behind).
Yes this I found it odd that the mpc5121 work is so far behind.
We have two other mpc5200 based boards that I am running with 2.6.29.
They are running well.
>
> The "mpc512x" branch contains a much smaller subset of drivers, but is
> based on a more recent kernel tree (2.6.31-rc5) and is the base of our
> (currently dozing) attempts to push this code into mainline.
>
>> I am now in the progress of cloning the linux-mpc512x git from denx and building from it.
>> Hopefully that will help me.
>
> Do not do this. This old repository was intended for co-operation
> with John Rigby, when he was still working for Freescale. It is a
> dead end and totally unsupported. Guess I should remove it. Indeed.
> Removed now. Sorry for the confusion.
Already done it and I got it to compile but as you hint I am having other problems.
Serial ports and ethernet works though :)
>
> Best regards,
>
> Wolfgang Denk
>
rg
kd
^ permalink raw reply related [flat|nested] 29+ messages in thread
* Re: UBIFS problem on MPC8536DS
2009-10-16 5:01 ` Felix Radensky
@ 2009-10-16 15:31 ` Scott Wood
2009-10-18 9:38 ` Felix Radensky
2009-10-22 8:20 ` Felix Radensky
0 siblings, 2 replies; 29+ messages in thread
From: Scott Wood @ 2009-10-16 15:31 UTC (permalink / raw)
To: Felix Radensky; +Cc: linuxppc-dev, linux-mtd, Adrian Hunter
On Fri, Oct 16, 2009 at 07:01:43AM +0200, Felix Radensky wrote:
> Thanks for confirmation. So the real problem is eLBC ?
> What happens if I access other devices on eLBC (e.g. FPGA)
> simultaneously with NAND or NOR ?
AFAICT, the problem is NAND being accessed simultaneously with anything else
on the eLBC (at least GPCM -- not sure about UPM). Instead of delaying the
memory-like transaction until the NAND special operation has completed, it
seems to just abort the NAND operation.
eLBC can't really tell the difference whether you've got NOR or FPGA hooked
up to a GPCM chip select, so the problem should still apply.
-Scott
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: UBIFS problem on MPC8536DS
2009-10-16 15:31 ` Scott Wood
@ 2009-10-18 9:38 ` Felix Radensky
2009-10-19 15:40 ` Scott Wood
2009-10-22 8:20 ` Felix Radensky
1 sibling, 1 reply; 29+ messages in thread
From: Felix Radensky @ 2009-10-18 9:38 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev, linux-mtd, Adrian Hunter
Hi, Scott
Scott Wood wrote:
> On Fri, Oct 16, 2009 at 07:01:43AM +0200, Felix Radensky wrote:
>> Thanks for confirmation. So the real problem is eLBC ?
>> What happens if I access other devices on eLBC (e.g. FPGA)
>> simultaneously with NAND or NOR ?
>
> AFAICT, the problem is NAND being accessed simultaneously with anything else
> on the eLBC (at least GPCM -- not sure about UPM). Instead of delaying the
> memory-like transaction until the NAND special operation has completed, it
> seems to just abort the NAND operation.
>
> eLBC can't really tell the difference whether you've got NOR or FPGA hooked
> up to a GPCM chip select, so the problem should still apply.
>
Can you please provide some code example of synchronizing GPCM and NAND ?
I may try implementing the NOR mapping driver you were talking about.
Thanks.
Felix.
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: MPC5121 CAN and USB
2009-10-15 23:10 ` Wolfgang Denk
@ 2009-10-19 6:46 ` David Jander
0 siblings, 0 replies; 29+ messages in thread
From: David Jander @ 2009-10-19 6:46 UTC (permalink / raw)
To: linuxppc-dev
Cc: Kári Davíðsson, linuxppc-dev, Paul Gibson, Wolfgang Denk
On Friday 16 October 2009 01:10:05 am Wolfgang Denk wrote:
> Dear Paul,
>
> In message <26b052040910151603y8fc9b00g678d6a873083f1e7@mail.gmail.com> you
wrote:
> > > The "ltib-mpc5121ads-20090602" branch reflects the exact state of the
> > > kernel contained in the LTIB with this name (dated July 2009, despite
> > > the name; based at 2.6.24.6, i. e. 7+ kernel versions behind).
> >
> > I have diff'ed this and it is very similar to the ltib in the BSP.
> > The MBX patches may be missing though. These patches can be obtained
> > via the Freescale SDK for the OpenGL on the MPC5121e webpage.
>
> Who cares. This code is about 8 (!) kernel releases behind. Scrap
> it.
I would love to, but as it stands, this is still the best we can get for the
MPC5121e :-(
I took that branch, merged the MBX patch in from the LTIB and ported the new
NFC driver from the 'mpc512x' branch back to this one, since the original
driver is buggy.
The latest OpenGL-ES libraries and MBX drivers released are closed-source,
buggy, but stable and seem to work well if your program doesn't do the kinds
of things that make it crash.
If you know the limitations of this and can live with it, it might be
bearable... I don't have any other option :-(
Best regards,
--
David Jander
Protonic Holland.
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: UBIFS problem on MPC8536DS
2009-10-18 9:38 ` Felix Radensky
@ 2009-10-19 15:40 ` Scott Wood
2009-10-19 19:39 ` Felix Radensky
0 siblings, 1 reply; 29+ messages in thread
From: Scott Wood @ 2009-10-19 15:40 UTC (permalink / raw)
To: Felix Radensky; +Cc: linuxppc-dev, linux-mtd, Adrian Hunter
On Sun, Oct 18, 2009 at 11:38:13AM +0200, Felix Radensky wrote:
> Hi, Scott
>
> Scott Wood wrote:
>> On Fri, Oct 16, 2009 at 07:01:43AM +0200, Felix Radensky wrote:
>>> Thanks for confirmation. So the real problem is eLBC ?
>>> What happens if I access other devices on eLBC (e.g. FPGA)
>>> simultaneously with NAND or NOR ?
>>
>> AFAICT, the problem is NAND being accessed simultaneously with anything else
>> on the eLBC (at least GPCM -- not sure about UPM). Instead of delaying the
>> memory-like transaction until the NAND special operation has completed, it
>> seems to just abort the NAND operation.
>>
>> eLBC can't really tell the difference whether you've got NOR or FPGA hooked
>> up to a GPCM chip select, so the problem should still apply.
>>
>
> Can you please provide some code example of synchronizing GPCM and NAND ?
I don't have any. It's something that would have to be written.
-Scott
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: UBIFS problem on MPC8536DS
2009-10-19 15:40 ` Scott Wood
@ 2009-10-19 19:39 ` Felix Radensky
2009-10-19 19:47 ` Scott Wood
0 siblings, 1 reply; 29+ messages in thread
From: Felix Radensky @ 2009-10-19 19:39 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev, linux-mtd
Scott Wood wrote:
> On Sun, Oct 18, 2009 at 11:38:13AM +0200, Felix Radensky wrote:
>
>> Hi, Scott
>>
>> Scott Wood wrote:
>>
>>> On Fri, Oct 16, 2009 at 07:01:43AM +0200, Felix Radensky wrote:
>>>
>>>> Thanks for confirmation. So the real problem is eLBC ?
>>>> What happens if I access other devices on eLBC (e.g. FPGA)
>>>> simultaneously with NAND or NOR ?
>>>>
>>> AFAICT, the problem is NAND being accessed simultaneously with anything else
>>> on the eLBC (at least GPCM -- not sure about UPM). Instead of delaying the
>>> memory-like transaction until the NAND special operation has completed, it
>>> seems to just abort the NAND operation.
>>>
>>> eLBC can't really tell the difference whether you've got NOR or FPGA hooked
>>> up to a GPCM chip select, so the problem should still apply.
>>>
>>>
>> Can you please provide some code example of synchronizing GPCM and NAND ?
>>
>
> I don't have any. It's something that would have to be written.
>
OK, no problem. I just wanted to get an idea of what should be done.
Should the NOR code poll some eLBC register to wait for completion of
NAND special operation ? Can you tell what register is relevant ?
Thanks.
Felix.
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: UBIFS problem on MPC8536DS
2009-10-19 19:39 ` Felix Radensky
@ 2009-10-19 19:47 ` Scott Wood
2009-10-19 20:19 ` Felix Radensky
2009-10-20 15:30 ` Felix Radensky
0 siblings, 2 replies; 29+ messages in thread
From: Scott Wood @ 2009-10-19 19:47 UTC (permalink / raw)
To: Felix Radensky; +Cc: linuxppc-dev, linux-mtd
Felix Radensky wrote:
> OK, no problem. I just wanted to get an idea of what should be done.
> Should the NOR code poll some eLBC register to wait for completion of
> NAND special operation ? Can you tell what register is relevant ?
I was thinking you'd just share a mutex with the NAND code.
-Scott
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: UBIFS problem on MPC8536DS
2009-10-19 19:47 ` Scott Wood
@ 2009-10-19 20:19 ` Felix Radensky
2009-10-20 15:30 ` Felix Radensky
1 sibling, 0 replies; 29+ messages in thread
From: Felix Radensky @ 2009-10-19 20:19 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev, linux-mtd
Scott Wood wrote:
> Felix Radensky wrote:
>> OK, no problem. I just wanted to get an idea of what should be done.
>> Should the NOR code poll some eLBC register to wait for completion of
>> NAND special operation ? Can you tell what register is relevant ?
>
> I was thinking you'd just share a mutex with the NAND code.
Thanks. Do I understand correctly that in fsl_ebc_nand.c this mutex should
protect the execution of special operation and wait for completion in
fsl_elbc_run_command() routine ?
Felix.
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: UBIFS problem on MPC8536DS
2009-10-19 19:47 ` Scott Wood
2009-10-19 20:19 ` Felix Radensky
@ 2009-10-20 15:30 ` Felix Radensky
1 sibling, 0 replies; 29+ messages in thread
From: Felix Radensky @ 2009-10-20 15:30 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev, linux-mtd
Scott Wood wrote:
> Felix Radensky wrote:
>> OK, no problem. I just wanted to get an idea of what should be done.
>> Should the NOR code poll some eLBC register to wait for completion of
>> NAND special operation ? Can you tell what register is relevant ?
>
> I was thinking you'd just share a mutex with the NAND code.
>
OK, I have NOR and NAND synchronized properly now.
Thanks a lot for your help.
Felix.
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: UBIFS problem on MPC8536DS
2009-10-16 15:31 ` Scott Wood
2009-10-18 9:38 ` Felix Radensky
@ 2009-10-22 8:20 ` Felix Radensky
2009-10-22 16:07 ` Scott Wood
1 sibling, 1 reply; 29+ messages in thread
From: Felix Radensky @ 2009-10-22 8:20 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev, linux-mtd
Hi, Scott
Scott Wood wrote:
> On Fri, Oct 16, 2009 at 07:01:43AM +0200, Felix Radensky wrote:
>
>> Thanks for confirmation. So the real problem is eLBC ?
>> What happens if I access other devices on eLBC (e.g. FPGA)
>> simultaneously with NAND or NOR ?
>>
>
> AFAICT, the problem is NAND being accessed simultaneously with anything else
> on the eLBC (at least GPCM -- not sure about UPM). Instead of delaying the
> memory-like transaction until the NAND special operation has completed, it
> seems to just abort the NAND operation.
>
> eLBC can't really tell the difference whether you've got NOR or FPGA hooked
> up to a GPCM chip select, so the problem should still apply.
>
Are you aware of Freescale plans to fix the problem in new silicon
revisions ?
Also, can you please tell what CPUs are affected by this, except 8536
and 8572.
Thanks a lot.
Felix.
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: UBIFS problem on MPC8536DS
2009-10-22 8:20 ` Felix Radensky
@ 2009-10-22 16:07 ` Scott Wood
0 siblings, 0 replies; 29+ messages in thread
From: Scott Wood @ 2009-10-22 16:07 UTC (permalink / raw)
To: Felix Radensky; +Cc: linuxppc-dev, linux-mtd
Felix Radensky wrote:
> Are you aware of Freescale plans to fix the problem in new silicon
> revisions ?
I don't know anything yet -- still trying to get in touch with the
relevant hardware people.
> Also, can you please tell what CPUs are affected by this, except 8536
> and 8572.
I suppose anything with an eLBC could be affected.
-Scott
^ permalink raw reply [flat|nested] 29+ messages in thread
end of thread, other threads:[~2009-10-22 16:07 UTC | newest]
Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-14 10:54 UBIFS problem on MPC8536DS Felix Radensky
2009-10-14 12:36 ` Adrian Hunter
2009-10-14 13:02 ` Felix Radensky
2009-10-14 13:21 ` Felix Radensky
2009-10-14 16:44 ` Adrian Hunter
2009-10-14 17:48 ` Felix Radensky
2009-10-14 18:13 ` Scott Wood
2009-10-14 20:12 ` Felix Radensky
2009-10-15 20:07 ` Scott Wood
2009-10-16 5:01 ` Felix Radensky
2009-10-16 15:31 ` Scott Wood
2009-10-18 9:38 ` Felix Radensky
2009-10-19 15:40 ` Scott Wood
2009-10-19 19:39 ` Felix Radensky
2009-10-19 19:47 ` Scott Wood
2009-10-19 20:19 ` Felix Radensky
2009-10-20 15:30 ` Felix Radensky
2009-10-22 8:20 ` Felix Radensky
2009-10-22 16:07 ` Scott Wood
2009-10-15 9:54 ` Norbert van Bolhuis
2009-10-15 10:45 ` MPC5121 CAN and USB Kári Davíðsson
2009-10-15 11:20 ` Paul Gibson
2009-10-15 11:36 ` Kári Davíðsson
2009-10-15 18:30 ` Wolfgang Denk
2009-10-15 23:03 ` Paul Gibson
2009-10-15 23:10 ` Wolfgang Denk
2009-10-19 6:46 ` David Jander
2009-10-16 13:53 ` Kári Davíðsson
2009-10-15 12:49 ` UBIFS problem on MPC8536DS Felix Radensky
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.