UBIFS problem on MPC8536DS
Subsystems (2)
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.
Quoted 89 lines · Felix Radensky
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
Quoted 2 lines
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?
Hi, Adrian
Quoted 90 lines · Adrian Hunter
Quoted 89 lines · Felix Radensky
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
Quoted 10 lines
Quoted 2 lines
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.
Quoted 90 lines · Adrian Hunter
Quoted 89 lines · Felix Radensky
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
Quoted 8 lines
Quoted 2 lines
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.
Quoted 6 lines
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Quoted 93 lines · Felix Radensky
Quoted 92 lines · Adrian Hunter
Quoted 91 lines · Felix Radensky
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 -30I'd appreciate any hints on what can cause this. Is it a hardware problem, mtd layer problem or UBI problem ?
Quoted 8 lines
Quoted 5 lines
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.
Quoted 101 lines · Adrian Hunter
Quoted 100 lines · Felix Radensky
Quoted 90 lines · Adrian Hunter
Quoted 89 lines · Felix Radensky
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 -30Quoted 7 lines
Quoted 2 lines
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.
Quoted 9 lines
Quoted 1 line
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.
Quoted 5 lines · Felix Radensky
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
Hi, Scott
Quoted 11 lines · Scott Wood
Quoted 5 lines · Felix Radensky
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=yCONFIG_MTD_UBI_WL_THRESHOLD=4096CONFIG_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 setCONFIG_UBIFS_FS=y
# CONFIG_UBIFS_FS_XATTR is not set
# CONFIG_UBIFS_FS_ADVANCED_COMPR is not setCONFIG_UBIFS_FS_LZO=yCONFIG_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/rfsflash_eraseall /dev/$nor_dev || exit 1
Felix.
Quoted 8 lines · Scott Wood
Quoted 5 lines · Felix Radensky
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
Hi, Scott
Quoted 8 lines · Scott Wood
Quoted 7 lines · Scott Wood
Quoted 5 lines · Felix Radensky
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 ?
Quoted 7 lines
Quoted 1 line
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.
Quoted 3 lines · Felix Radensky
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
Hi, Scott
Quoted 5 lines · Scott Wood
Quoted 3 lines · Felix Radensky
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 ?
Quoted 8 lines
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.
Quoted 13 lines · Felix Radensky
Hi, Scott
Quoted 10 lines · Scott Wood
Quoted 3 lines · Felix Radensky
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.
Quoted 5 lines
Quoted 3 lines
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
Quoted 17 lines · Scott Wood
Quoted 15 lines · Felix Radensky
Hi, Scott
Quoted 11 lines · Scott Wood
Quoted 4 lines · Felix Radensky
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.
Quoted 9 lines
Quoted 6 lines
Quoted 4 lines
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.
Quoted 3 lines · Felix Radensky
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
Quoted 6 lines · Scott Wood
Quoted 3 lines · Felix Radensky
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.
Quoted 7 lines · Scott Wood
Quoted 3 lines · Felix Radensky
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.
Hi, Scott
Quoted 7 lines · Scott Wood
Quoted 4 lines · Felix Radensky
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 ?
Quoted 8 lines
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.
Quoted 1 line · Felix Radensky
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.
Quoted 1 line
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
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.
Quoted 104 lines · Felix Radensky
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 -30I'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
[email protected]
https://lists.ozlabs.org/listinfo/linuxppc-dev
MPC5121 CAN and USB
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
Re: MPC5121 CAN and USB
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
Quoted 14 lines · Kári Davíðsson
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
[email protected]
https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: MPC5121 CAN and USB
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
Quoted 4 lines · Paul Gibson
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
Quoted 2 lines
the BSP:
http://git.denx.de/?p=3Dlinux-2.6-denx.git;a=3Dshortlog;h=3Drefs/heads/lt=
ib-mpc5121ads-20090602=20
Quoted 30 lines
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
=20Quoted 7 lines · 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.Quoted 9 lines
rg
kd_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://lists.ozlabs.org/listinfo/linuxppc-dev=20
_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://lists.ozlabs.org/listinfo/linuxppc-dev
=20
Re: MPC5121 CAN and USB
Dear =?ISO-8859-1?Q?K=E1ri_Dav=ED=F0sson?=,
Quoted 3 lines · In message <[email protected]> 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.
Quoted 1 line
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.
Quoted 1 line
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.
Quoted 2 lines
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
Signature · 7 lines
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: [email protected] 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
Re: MPC5121 CAN and USB
Quoted 1 line
Quoted 1 line
The kernel from the BSP on Freescale site is crashing on the CAN in my c=
ase
Quoted 5 lines
Quoted 1 line
=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.
Quoted 3 lines
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
Re: MPC5121 CAN and USB
Dear Paul,
Quoted 8 lines · In message <[email protected]> you…
Quoted 4 lines
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
Signature · 4 lines
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: [email protected] Were there fewer fools, knaves would starve. - Anonymous
Re: MPC5121 CAN and USB
Quoted 3 lines · Wolfgang Denk
Dear Paul,
In message <[email protected]> you
Quoted 10 lines · wrote:
Quoted 7 lines
Quoted 3 lines
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,
Signature · 2 lines
David Jander Protonic Holland.
Re: MPC5121 CAN and USB
In reply to Wolfgang DenkHello,
Quoted 9 lines · Wolfgang Denk
Dear =?ISO-8859-1?Q?K=E1ri_Dav=ED=F0sson?=,
Quoted 2 lines · In message <[email protected]> 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.
drivers/net/can/mscan/mpc52xx_can.c +2 -2
@@ -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);
Quoted 8 lines
Quoted 2 lines
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.
Quoted 1 line
I had not looked at http://git.denx.de/?p=linux-2.6-denx.git;a=shortlog;h=refs/heads/ltib-mpc5121ads-20090602
Quoted 7 lines
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.
Quoted 5 lines
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.
Quoted 7 lines
Quoted 2 lines
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 :)
Quoted 5 lines
Best regards,
Wolfgang Denk
rg
kd
Hi, Norbert
Quoted 4 lines · Norbert van Bolhuis
Hi Felix,
do you have
CONFIG_NO_HZdefined ?
Quoted 9 lines
I've seen similar problems with powerpc +
CONFIG_NO_HZ. In my case the low-leveldo_write_buffer(cfi_cmdset_0002.c) timed out too early. See
http://lkml.org/lkml/2009/9/3/84Maybe in your case it's the
do_erase_chiptiming 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.