[stamp9g20] Problem with sleep

I am using a Stamp9G20 with a 2.6.29 kernel.
In order to save energy, I put the system in deep sleep every 30seconds, the work period is about 3sec, and sleep period about 27sec.
The problem is that sometimes, after couple of hours or days, when it get back from sleep mode the SD card seems to be unavailable anymore.

Following error messages are displayed:

done.
Freezing user space processes ... (elapsed 0.00 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
mmc0: card b368 removed
MMC: killing requests for dead queue
Restarting tasks ... <2>EXT3-fs error (device mmcblk0p1): ext3_find_entry: done.
reading directory #2 offset 0
Buffer I/O error on device mmcblk0p1, logical block 0
lost page write due to I/O error on mmcblk0p1
mmc0: host does not support reading read-only switch. assuming write-enable.
mmc0: new SDHC card at address b368
mmcblk1: mmc0:b368 AF UD 3.76 GiB
mmcblk1: p1

---- SIMUEXT3-fs error (device mmcblk0p1): ext3_get_inode_loc: Lunable to read inode block - inode=23869, block=98548@
T------------[ cut here ]------------
IWARNING: at fs/buffer.c:1247 mark_buffer_dirty+0x38/0xc4()
OModules linked in:N
[] M(dump_stack+0x0/0x14) Ofrom [] D(warn_slowpath+0x70/0x8c)
E[] (warn_slowpath+0x0/0x8c) (from [] 2(mark_buffer_dirty+0x38/0xc4)
) r3:00100828 r2:00000000-
r7:00000001D r6:c3408470= r5:c02d88fc2 r4:c34084702
3[] .(mark_buffer_dirty+0x0/0xc4) 0from [] (ext3_commit_super+0x54/0x6c)
A r5:c3fff400= r4:c383b000-
1[] .(ext3_commit_super+0x0/0x6c) 0from [] (ext3_handle_error+0x9c/0xc0)
- r7:c3497780- r6:c3496f28- r5:c3fff400- r4:c383b000

[] (ext3_handle_error+0x0/0xc0) from [] (ext3_error+0x4c/0x5c)
r5:00000100 r4:c383b000
[] (ext3_error+0x0/0x5c) from [] (__ext3_get_inode_loc+0x328/0x35c)
r3:00005d3d r2:c0288a74
r4:00001000
[] (__ext3_get_inode_loc+0x0/0x35c) from [] (ext3_get_inode_loc+0x20/0x24)
[] (ext3_get_inode_loc+0x0/0x24) from [] (ext3_reserve_inode_write+0x2c/0x80)
[] (ext3_reserve_inode_write+0x0/0x80) from [] (ext3_mark_inode_dirty+0x24/0x44)
r7:c383b000 r6:c391dcec r5:c34b70c0 r4:c3541260
[] (ext3_mark_inode_dirty+0x0/0x44) from [] (ext3_dirty_inode+0x70/0x88)
r6:c34b70c0 r5:00000000 r4:c3541260
[] (ext3_dirty_inode+0x0/0x88) from [] (__mark_inode_dirty+0x38/0x1b4)
r6:c3be4340 r5:00000001 r4:c34b70c0
[] (__mark_inode_dirty+0x0/0x1b4) from [] (file_update_time+0x100/0x134)
r8:00000000 r7:00000000 r6:c3be4340 r5:c34b70c0 r4:c391dd68
[] (file_update_time+0x0/0x134) from [] (__generic_file_aio_write_nolock+0x370/0x4e8)
r7:00000000 r6:00003482 r5:00000000 r4:0000350e
[] (__generic_file_aio_write_nolock+0x0/0x4e8) from [] (generic_file_aio_write+0x78/0xf4)
[] (generic_file_aio_write+0x0/0xf4) from [] (ext3_file_write+0x28/0xa8)
[] (ext3_file_write+0x0/0xa8) from [] (do_sync_write+0xbc/0x10c)
r7:c391df20 r6:c391de90 r5:c3be4340 r4:c391de90
[] (do_sync_write+0x0/0x10c) from [] (vfs_write+0xb8/0x148)
[] (vfs_write+0x0/0x148) from [] (sys_write+0x44/0x70)
r7:00000004 r6:c3be4340 r5:00000000 r4:00003482
[] (sys_write+0x0/0x70) from [] (ret_fast_syscall+0x0/0x2c)
r6:0000008c r5:0006d930 r4:0000008c
---[ end trace 99c9ac1ae7356af3 ]---
Buffer I/O error on device mmcblk0p1, logical block 0
lost page write due to I/O error on mmcblk0p1
EXT3-fs error (device mmcblk0p1) in ext3_reserve_inode_write: IO failure
Buffer I/O error on device mmcblk0p1, logical block 0
lost page write due to I/O error on mmcblk0p1
EXT3-fs error (device mmcblk0p1): ext3_get_inode_loc: unable to read inode block - inode=23869, block=98548
Buffer I/O error on device mmcblk0p1, logical block 0
lost page write due to I/O error on mmcblk0p1
EXT3-fs error (device mmcblk0p1) in ext3_reserve_inode_write: IO failure
Buffer I/O error on device mmcblk0p1, logical block 0
lost page write due to I/O error on mmcblk0p1
EXT3-fs error (device mmcblk0p1): ext3_find_entry: reading directory #222657 offset 0
Buffer I/O error on device mmcblk0p1, logical block 0
lost page write due to I/O error on mmcblk0p1
Buffer I/O error on device mmcblk0p1, logical block 115154
lost page write due to I/O error on mmcblk0p1
JBD: Detected IO errors while flushing file data on mmcblk0p1
journal_bmap: journal block not found at offset 5728 on mmcblk0p1
Aborting journal on device mmcblk0p1.
Buffer I/O error on device mmcblk0p1, logical block 459251
lost page write due to I/O error on mmcblk0p1

---- SIMUext3_abort called.
LEXT3-fs error (device mmcblk0p1): ext3_journal_start_sb: @Detected aborted journalT
IRemounting filesystem read-only

How can I fix the problem ?
(I already use an industrial grade SD card)

Thanks

Syndicate content