[#4833] R/W on BF527 Nand hangs
Submitted By: Yi Li
Open Date
2009-01-22 02:37:04 Close Date
2009-03-03 03:11:30
Priority:
Medium High Assignee:
Cliff Cai
Status:
Closed Fixed In Release:
N/A
Found In Release:
N/A Release:
Category:
N/A Board:
EZKIT Lite
Processor:
BF527 Silicon Revision:
0.1
Is this bug repeatable?:
Yes Resolution:
Fixed
Uboot version or rev.:
Toolchain version or rev.:
svn trunk 4.1
App binary format:
N/A
Summary: R/W on BF527 Nand hangs
Details:
Doing R/W (cp, touch...) on yaffs on BF527 Nand would hang. This is also reported on 2008R1.5. : blackfin.uclinux.org/gf/project/uclinux-dist/forum/?action=ForumBrowse&_forum_action=MessageReply&message_id=68044
Looks like bug in NFC driver.
BF5xx on-chip NAND FLash Controller Driver, Version 1.2 (c) 2007 Analog Devices, Inc.
bf5xx-nand bf5xx-nand.0: page_size=256, data_width=8, wr_dly=3, rd_dly=3
NAND device: Manufacturer ID: 0x20, Chip ID: 0xdc (ST Micro NAND 512MiB 3,3V 8-bit)
Creating 2 MTD partitions on "NAND 512MiB 3,3V 8-bit":
0x00000000-0x00400000 : "linux kernel(nand)"
0x00400000-0x20000000 : "file system(nand)"
root:/> cat /proc/mtd
dev: size erasesize name
mtd0: 00400000 00020000 "linux kernel(nand)"
mtd1: 1fc00000 00020000 "file system(nand)"
root:/> mount -t yaffs2 /dev/mtdblock1 /mnt/
yaffs: dev is 32505857 name is "mtdblock1"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.1, "mtdblock1"
block 3047 is bad
yaffs_read_super: isCheckpointed 0
root:/> cd /mnt/
root:/mnt> ls
lost+found
root:/mnt> touch test
INFO: task touch:280 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
touch D ffa00830 0 280 272
Stack info:
SP: [0x03eb1818] <0x03eb1818> /* kernel dynamic memory */
FP: (0x03eb1894)
Memory from 0x03eb1810 to 03eb2000
03eb1810: 03eb1830 <00008e44>[00000000] 03e93cc0 001c603c 03b73060 001b5210 00000002
03eb1830: 03eb0000 03eb1850 <0014a928><00009832> 00000001 03e93cec 03eb0000 03eb0000
03eb1850: 03eb18c8 <0014ad74> 03eb0000 03eb0000 03019ff0 7fffffff 00000000 00000002
03eb1870: 001c7430 001c6d2c 03eb1878 03eb1878 03eb1ac0 <0002572e> 03eb18bc 0014ff97
03eb1890:<000097aa>(00000000)<0014ab38> 03eb0000 7fffffff 00000000 03ee006c 00000001
03eb18b0: 0831ea1e 00000001 03e93cc0 0000a4c8 03019ff4 03019ff4 03019e0c <000d8330>
03eb18d0: 03019e00 03019ed0 03077800 03077900 00000001 00000040 00000100 <000a94a0>
03eb18f0: 00000000 003d0900 <000d3874> 03b64003 03077900 00000006 001d2468 03e93cc0
03eb1910: 00000000 03eb1940 <0000cb60> 00000003 03b64000 03b64040 00000800 <000d5af0>
03eb1930: 00000000 03019ed0 03077800 00000800 00000001 00000800 03077800 03eb1980
03eb1950:<00016644> 03077800 00000800 001b9f20 00000000 00000800 0000003f 00000000
03eb1970: 0000001c 03022660 00000000 00000000 03eb1a30 <000d5d7e> 03021ca0 00000000
03eb1990: 00400000 03019ed0 00000000 00000000 00000000 03019e0c 00000006 03019e0c
03eb19b0: 03eb1a30 03eb19e0 <000097aa> 00000000 003d0900 00000000 00000000 00000000
03eb19d0: 00000000 <000d0ec4> 03021ca0 03021ca0 03eb1b10 00000000 1fc00000 00000000
03eb19f0: 03188000 03019e0c 001b5240 00000001 03eb1a30 <0008bd42> 03ebe000 00000000
03eb1a10: 00000000 03077800 03188000 03e850a0 001c8350 03eb1a30 00000001 03eb1a4c
03eb1a30: 00000001 00000800 00000000 0000001c 001b5210 00000000 03077800 03022660
03eb1a50:<0000a4a4> 03eb1a6c <0000a4a4> 000003c0 00000000 00000008 ffffffe8 00000000
03eb1a70: 00000000 <0008a7b6> 03eb1b10 03ebe000 00000001 00000040 03077800 00000040
03eb1a90: 03188000 03e93cec 03e93cc0 00000000 03eb1b10 <0000cb60> 03eb1ac8 001b5240
03eb1ab0: 03eb1acc <0000cb6e> 00001a80 03e93cec <00016aaa> 001c6d2c 03eb1ac8 03eb1ac8
03eb1ad0:<00701280><0002572e> 03eb1b0c <00016644> 00000000 <00083d24> 03ebe000 <00083d36>
03eb1af0: 03ebe000 03ebe000 00000000 03077800 007b2f3c 03eb1b04 03eb1b04 03eb1b10
03eb1b10:<0001309e> 001b9f84 00000000 00000001 00000000 ffffffff 00000101 <0002c4fc>
03eb1b30: 001c9fcc 00000006 001bc8ec 00000006 <00701280><ffa002da> 001be64c 00001000
03eb1b50: 001bc8ec 00000006 <000856d6> 03190000 00000000 00000001 00000040 <ffa002da>
03eb1b70:<ffa00a82> 03eb1cd8 00445000 03ebe000 <00086796> 03eb1cf8 03037000 031981f0
03eb1b90: 00000001 00000001 00000000 00000000 0060197a 03037000 03eb1cf8 00000001
03eb1bb0: 6c6c6973 6c6f2079 616e2064 0000656d 00000008 ffffffe8 00000000 <000097aa>
03eb1bd0: 03eb1bfc 001ffc00 00000000 003d0900 00000000 03eb1c0c <00009832> 0045874c
03eb1bf0: 03e93cec 00000000 00000044 03eb0000 00000000 00000000 00000000 001d879c
03eb1c10: 001d7db4 001d7db4 00000001 <00032226> 03e93cc0 001d8798 03efd520 03eb0000
03eb1c30: 000040d0 00000000 00000001 000240d0 00000000 00000000 001d8798 00000001
03eb1c50: 00000044 03eb0000 03eb0000 03ef37a0 000240d0 03eb0000 00000010 <00755380>
03eb1c70: 00000000 03eb0000 006ed780 <0003aeb0><0003b102> 00000000 00000000 <0003b276>
03eb1c90: 00000000 00000000 0319c000 000000d0 <ffa002da> 001be64c 0045f107 00000000
03eb1cb0: 000000d0 00000000 03efd520 00000010 03ebe000 <0003b428> 006ed780 03ebe000
03eb1cd0: 031981fc 00000105 0000ffff 03ebe000 <0003aeb0> 03ebe000 <0008428a> 031981f0
03eb1cf0:<00083962> 0000006c aaaaaaaa 00000000 00000105 00000000 00000000 00000000
03eb1d10: 00000000 00000000 00000001 00000000 00000001 00000001 00000000 00000000
03eb1d30: 00000001 00000000 ffffffff 55555555 007b2ee4 <00087d96> 031980f8 00000000
03eb1d50: 00000000 00000000 031981f0 007b2f3c 00000001 <000434c2> 03eb1e38 03054070
03eb1d70: 00000000 00000000 <00087ef2> 031980f8 001cd2a0 03054070 007b2f3c 000081a4
03eb1d90: 03ebe000 00000000 0045f107 01c4ddc5 00000004 000081a4 00000000 00000000
03eb1db0: 00000000 00000000 00000000 <00081bea> 00000000 <000431da> 00000106 <00045240>
03eb1dd0: 00000000 00000000 <00043272> 03eb1ea4 <000445a6> 007b2ee4 03eb1e44 00000000
03eb1df0: 00000000 03054070 000081a4 004199fc 001cbfd4 00000043 <0004394e> 00000000
03eb1e10: 03eb1e44 <000463f4> 030529cc 00000043 00000026 00000000 00005401 00462e84
03eb1e30: 00058748 03eb1e44 03ef38a0 00000000 00000000 03ef38a0 030529cc 01c4ddc5
03eb1e50: 00000004 03e95000 00000300 00000000 00000000 00050000 <00046e3e><00040abc>
03eb1e70: 001cc528 0301b000 001cc0f0 00462ea8 <0003aeb0><0004c6e0> 00000043 000001b6
03eb1e90: 0393f220 00000042 00000003 03ef38a0 007b2ee4 00462ea8 <0003c066> ffffff9c
03eb1eb0: 00000005 0000005b 00000042 00000003 03e95000 004199fc 004199fc 00462f80
03eb1ed0: 00000042 000001a4 00000000 <0003c0f8> 0003c0e0 00000005 00000042 ffffe000
03eb1ef0: 00000002 <ffa0076c> 00047128 <ffa0076c> 000001b6 <ffa0076c> 00000000 03008776
03eb1f10: 03b73de0 001b5210 00462fa9 004199fc 00000002 00401fba 00008000 00000000
03eb1f30: 00000000 03eb2000 00401fba 00401fba <00434450><ffa00ca0> 02002000 00612295
03eb1f50: 0040c58f 0061228e 0040c586 00000000 0000000f 00000000 00000000 00000000
03eb1f70: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
03eb1f90: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0044f72c
03eb1fb0: 00462fe6 00462e98 00462ea8 00462f84 004596d0 0000005b 004596d0 00000002
03eb1fd0: 00000005 00000000 00000000 00000002 004199fc 00462fa9 000001b6 00000042
03eb1ff0: 00462fa9 00462fa9 00000005 00000006 03e950e0
Return addresses in stack:
address : <0x00008e44> { _deactivate_task + 0x28 }
address : <0x0014a928> { _schedule + 0x174 }
address : <0x00009832> { _sched_slice + 0x42 }
address : <0x0014ad74> { _schedule_timeout + 0x6c }
address : <0x0002572e> { _tick_handle_periodic + 0xe }
address : <0x000097aa> { _update_curr + 0x62 }
frame 1 : <0x0014ab38> { _wait_for_common + 0x84 }
address : <0x000d8330> { _bf5xx_nand_dma_rw + 0xb8 }
address : <0x000a94a0> { _zlib_deflate + 0x1d0 }
address : <0x000d3874> { _nand_read_page_hwecc + 0x4c }
address : <0x0000cb60> { _task_tick_fair + 0x1c }
address : <0x000d5af0> { _nand_do_read_ops + 0x104 }
address : <0x00016644> { _run_timer_softirq + 0x14 }
address : <0x000d5d7e> { _nand_read_oob + 0x62 }
address : <0x000097aa> { _update_curr + 0x62 }
address : <0x000d0ec4> { _part_read_oob + 0x58 }
address : <0x0008bd42> { _nandmtd2_ReadChunkWithTagsFromNAND + 0x7a }
address : <0x0000a4a4> { _try_to_wake_up + 0x88 }
address : <0x0000a4a4> { _try_to_wake_up + 0x88 }
address : <0x0008a7b6> { _yaffs_ReadChunkWithTagsFromNAND + 0x2e }
address : <0x0000cb60> { _task_tick_fair + 0x1c }
address : <0x0000cb6e> { _task_tick_fair + 0x2a }
address : <0x00016aaa> { _update_process_times + 0x1e }
address : <0x00701280> /* kernel dynamic memory */
address : <0x0002572e> { _tick_handle_periodic + 0xe }
address : <0x00016644> { _run_timer_softirq + 0x14 }
address : <0x00083d24> { _yaffs_CheckChunkErased + 0x14 }
address : <0x00083d36> { _yaffs_CheckChunkErased + 0x26 }
address : <0x0001309e> { ___do_softirq + 0x5a }
address : <0x0002c4fc> { _handle_simple_irq + 0x74 }
address : <0x00701280> /* kernel dynamic memory */
address : <0xffa002da> { _asm_do_IRQ + 0x5a }
address : <0x000856d6> { _yaffs_WriteNewChunkWithTagsToNAND + 0x2b6 }
address : <0xffa002da> { _asm_do_IRQ + 0x5a }
address : <0xffa00a82> { __common_int_entry + 0x62 }
address : <0x00086796> { _yaffs_UpdateObjectHeader + 0x1ea }
address : <0x000097aa> { _update_curr + 0x62 }
address : <0x00009832> { _sched_slice + 0x42 }
address : <0x00032226> { ___alloc_pages_internal + 0x62 }
address : <0x00755380> /* kernel dynamic memory */
address : <0x0003aeb0> { _kmem_cache_alloc + 0x54 }
address : <0x0003b102> { _cache_alloc_refill + 0x236 }
address : <0x0003b276> { _cache_alloc_refill + 0x3aa }
address : <0xffa002da> { _asm_do_IRQ + 0x5a }
address : <0x0003b428> { ___kmalloc + 0xac }
address : <0x0003aeb0> { _kmem_cache_alloc + 0x54 }
address : <0x0008428a> { _yaffs_RemoveObjectFromDirectory + 0x16 }
address : <0x00083962> { _yaffs_GetTnodeRaw + 0xae }
address : <0x00087d96> { _yaffs_MknodObject + 0xbe }
address : <0x000434c2> { _path_put + 0xe }
address : <0x00087ef2> { _yaffs_MknodFile + 0x2a }
address : <0x00081bea> { _yaffs_mknod + 0x15a }
address : <0x000431da> { _generic_permission + 0xc2 }
address : <0x00045240> { _path_walk + 0x44 }
address : <0x00043272> { _inode_permission + 0x6e }
address : <0x000445a6> { _vfs_create + 0x82 }
address : <0x0004394e> { _lookup_hash + 0x12 }
address : <0x000463f4> { _do_filp_open + 0x568 }
address : <0x00046e3e> { _do_vfs_ioctl + 0x4e }
address : <0x00040abc> { _search_binary_handler + 0x88 }
address : <0x0003aeb0> { _kmem_cache_alloc + 0x54 }
address : <0x0004c6e0> { _alloc_fd + 0x58 }
address : <0x0003c066> { _do_sys_open + 0x36 }
address : <0x0003c0f8> { _sys_open + 0x18 }
address : <0xffa0076c> { _system_call + 0x68 }
address : <0xffa0076c> { _system_call + 0x68 }
address : <0xffa0076c> { _system_call + 0x68 }
address : <0x00434450> [ touch + 0x34450 ]
address : <0xffa00ca0> { _evt_system_call + 0x64 }
Follow-ups
--- Yi Li 2009-01-22 02:49:31
In the case of jffs2:
root:/> flash_eraseall -j /dev/mtd1
Erasing 128 Kibyte @ 17ca0000 -- 74 % complete. Cleanmarker written at
17ca0000.
Skipping bad block at 0x17cc0000
Erasing 128 Kibyte @ 1fc00000 -- 100 % complete.Cleanmarker written at
1fbe0000.
root:/> mount -t jffs2 /dev/mtdblock1 /mnt/
INFO: task mount:278 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this
message.
mount D ffa00830 0 278 272
Stack info:
SP: [0x03183a7c] <0x03183a7c> /* kernel dynamic memory */
FP: (0x03183c68)
Memory from 0x03183a70 to 03184000
03183a70: 00000000 03183a94 <00008e44>[00000000] 03e859a0 001c603c
03b774e0 001b5210
03183a90: 00000002 03182000 03183ab4 <0014a928> 03183ac8
<00009832> 00000040 03182000
03183ab0: 03182000 03183b2c <0014ad74> 03182000 03182000 03021ff0
7fffffff 00000000
03183ad0: 00000002 001c7430 <00016aaa> 001c6d2c 03183ae0 03183ae0
001c7430 <0002572e>
03183af0: 03183b24 <00016644> 001ba098 <0014ab38> 03182000
7fffffff 00000000 00000001
03183b10:<0001309e> 001b9f84 00000001 03e859a0 0000a4c8 03021ff4
03021ff4 03021e0c
03183b30:<000d8330> 03021e00 03021ed0 031a0000 03b64180 00000001
00000040 00000100
03183b50: 00000400 03183b80 000cad1c <000d3874> 03b64003 03b64180
00000006 001d2468
03183b70: 00000000 00000000 001d7dcc 001d7db4 00000003 03b64000 03b64040
00000400
03183b90:<000d5af0> 00000000 03021ed0 031a0000 00000400 00000000
00000800 03b64080
03183bb0: 0000ffff 00000020 03b64080 00000800 03021ed0 00000000 00000800
0000003f
03183bd0: 00000000 00000000 00000000 00000000 00000000 00000400
<000d6028> 03021ed0
03183bf0: 03021e0c 031c0000 00000400 00000000 00400000 00000000 03021e0c
<000d5d5c>
03183c10: 03021ed0 03021fb4 <000d0f66> 03029ca0 0300f400 00000000
1fc00000 00000400
03183c30: 00000000 03b600a8 0000003f 00000000 00000400 03183cc4 031a0000
<0007d670>
03183c50: 03183cc4 031a0000 00000400 00000000 00000000 03021e0c
(00000000)<000d4780>
03183c70: 00000400 03183cc4 031a0000 031a0000 0300f518 00000001 0300f400
<000787a4>
03183c90: 00033980 0300f200 031c0000 031a0000 00000400 00020000 03ef38a0
00000008
03183cb0: 00000000 00000000 00000400 03183cc4 031a0000 0300f200
<00078ce0> 00000001
03183cd0: 00000000 00000000 00000000 00000000 00000400 00000000 00000000
00000000
03183cf0: 00000000 00000000 00000000 00020000 03183d64 031a0000 00000000
00000400
03183d10: 031c0000 0002535c 00000b73 00020000 031a0000 03183d64
<0007af0e> 00033980
03183d30: 0300f200 0300f400 00020000 00000000 00008000 03ef38a0 03ef38a0
<0003aeb0>
03183d50: 03183d54 <000d059c> 001cc8cc <0003b414> 00000000
001cc8cc <0007cad6> 0300f400
03183d70: 0300f200 0007cfd4 00020000 00000000 <000d0610> 03ef38a0
03074000 <000d064e>
03183d90: 0300f200 03074000 0300f200 03029ca0 00008000 03074000 000d05a8
03029ca0
03183db0:<000d0730> 03ef38a0 03ecf000 00008000 01f00001 03074000
0007cfd4 03ef38a0
03183dd0: 03182000 03182000 001bcf54 03074000 03029ca0 0007cfd4 03ef38a0
00000000
03183df0: 00000000 <0007ce0e> 03ef38a0 001cc8cc 00008000 00000000
03074000 03ede000
03183e10: 03ecf000 03ecf000 03ecf000 00008000 03074000 0007cfd4 03ef38a0
<0003f420>
03183e30: 03ef37a0 <0004ce66> 00008000 03074000 03ef38a0
<0003f534> 00008000 03074000
03183e50: 00000000 001cc8cc 00008000 03ecf000 007b2000 03182000 00000010
00752e80
03183e70: 03074000 <0004e722> 00008000 00000000 03ecf000 007b2000
00000000 03183ef8
03183e90: 00000000 0302b000 03074000 03074000 00000001 03183eb4 03183eb4
00000000
03183eb0: 03ef37a0 03a07344 00462b14 <0004e910> 0004e8b0 00000015
00462e50 00000000
03183ed0: 0302b000 00462f99 004584d0 0000235d 2c1b8100 0000235d 00008000
03074000
03183ef0: 03ecf000 007b2000 03074000 <ffa0076c> 00000000 ffffe000
00000005 03030776
03183f10: 03b77de0 001b5210 00008000 004584d0 00000005 00401f7e 00008000
00000000
03183f30: 00000000 03184000 00401f7e 00401f7e
<00428ed4><ffa00ca0> 02003004 00612295
03183f50: 0040c691 0061228e 0040c690 00000000 00000000 00000000 00000000
00000000
03183f70: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000
03183f90: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
0044f72c
03183fb0: 00462fe6 00462b08 00462b14 00462e50 004596d0 00462e50 00459c74
00000016
03183fd0: 00000015 00008000 004584d0 00000005 004584d0 00008000 00462f93
00462fa8
03183ff0: 00462f99 00462f99 00000015 00000006 03efdc60
Return addresses in stack:
address : <0x00008e44> { _deactivate_task + 0x28 }
address : <0x0014a928> { _schedule + 0x174 }
address : <0x00009832> { _sched_slice + 0x42 }
address : <0x0014ad74> { _schedule_timeout + 0x6c }
address : <0x00016aaa> { _update_process_times + 0x1e }
address : <0x0002572e> { _tick_handle_periodic + 0xe }
address : <0x00016644> { _run_timer_softirq + 0x14 }
address : <0x0014ab38> { _wait_for_common + 0x84 }
address : <0x0001309e> { ___do_softirq + 0x5a }
address : <0x000d8330> { _bf5xx_nand_dma_rw + 0xb8 }
address : <0x000d3874> { _nand_read_page_hwecc + 0x4c }
address : <0x000d5af0> { _nand_do_read_ops + 0x104 }
address : <0x000d6028> { _nand_read + 0x78 }
address : <0x000d5d5c> { _nand_read_oob + 0x40 }
address : <0x000d0f66> { _part_read + 0x56 }
address : <0x0007d670> { _jffs2_flash_read + 0x48 }
frame 1 : <0x000d4780> { _nand_block_bad + 0xac }
address : <0x000787a4> { _jffs2_fill_scan_buf + 0x28 }
address : <0x00078ce0> { _jffs2_scan_medium + 0x524 }
address : <0x0007af0e> { _jffs2_do_mount_fs + 0x136 }
address : <0x0003aeb0> { _kmem_cache_alloc + 0x54 }
address : <0x000d059c> { _get_sb_mtd_compare + 0x0 }
address : <0x0003b414> { ___kmalloc + 0x98 }
address : <0x0007cad6> { _jffs2_do_fill_super + 0x92 }
address : <0x000d0610> { _get_sb_mtd_aux + 0x2c }
address : <0x000d064e> { _get_sb_mtd_aux + 0x6a }
address : <0x000d0730> { _get_sb_mtd + 0x68 }
address : <0x0007ce0e> { _jffs2_get_sb + 0x1a }
address : <0x0003f420> { _vfs_kern_mount + 0x40 }
address : <0x0004ce66> { _get_fs_type + 0x1e }
address : <0x0003f534> { _do_kern_mount + 0x24 }
address : <0x0004e722> { _do_mount + 0x36a }
address : <0x0004e910> { _sys_mount + 0x60 }
address : <0xffa0076c> { _system_call + 0x68 }
address : <0x00428ed4> [ mount + 0x28ed4 ]
address : <0xffa00ca0> { _evt_system_call + 0x64 }
--- Yi Li 2009-01-22 04:18:39
Looks to me, hangs at
bf5xx_nand_dma_rw(): wait_for_completion(&info->dma_completion)
DMA irq may never happen.
--- Cliff Cai 2009-02-04 05:57:52
Fixed now,The DMAs have different size on BF52x and BF54x.
Cliff
--- Yi Li 2009-03-03 03:11:30
fixed and close.
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
No Files Were Found