Kernel 2.6.36 and SD card problem

I instaled a new kernel 2.6.36.4 on the Panel-Card EVB with a stamp9261-panelcard-2.6.36.patch. Linux works very well. But I have problems with correct operation of the SD card.
I copy a files base from the PenDrive to the SD card using the command . The base contains about 50 folders and 1400 files with a total size of 20MB. Then I delete some files, copy some new files, umount SD and turn-off the Panel-Card EVB. After turn-on, when I am browsing files from the base there are various errors. I checked the card operation with the file system of FAT and EXT2.

// *** SD CARD – File System EXT2
find /data –name *.cpp
/data/BAZA-13/Strip/1273.cpp
EXT2-fs (mmcblk0p1): error: ext2_lookup: deleted inode referenced: 49468
/data/BAZA-13/Strip/1277.cpp
/data/BAZA-13/Strip/1278.cpp
/data/BAZA-13/Strip/1284.cpp
EXT2-fs (mmcblk0p1): error: ext2_lookup: deleted inode referenced: 49469
/data/BAZA-13/Strip/1285.cpp
/data/BAZA-10/Strip/190.cpp
EXT2-fs (mmcblk0p1): error: ext2_check_page:bad entry in directory #16339: : rec_len is smaller than minimal - offset=0, inode=0, rec_len=0, name_len=0
/data/BAZA-10/Strip/191.cpp
EXT2-fs (mmcblk0p1): error: ext2_readdir: bad page in #16339

// *** SD CARD – File System FAT
ls -l baza-10/ClassVie/*
FAT: Filesystem error (dev mmcblk0p1)
fat_get_cluster: invalid cluster chain (i_pos 0)
FAT: Filesystem error (dev mmcblk0p1)
fat_get_cluster: invalid cluster chain (i_pos 0)
ls: baza-10/ClassVie/*: Input/output error

Sometimes the error also occurs when you delete files.

rm -r BAZA-10
EXT2-fs (mmcblk0p1): error: ext2_check_page: bad entry in directory #24051: : rec_len is smaller than minimal - offset=0, inode=0, rec_len=0, name_len=0
EXT2-fs (mmcblk0p1): error: ext2_readdir: bad page in #24051
EXT2-fs (mmcblk0p1): error: ext2_check_page: bad entry in directory #24053: : rec_len is smaller than minimal - offset=0, inode=0, rec_len=0, name_len=0
EXT2-fs (mmcblk0p1): error: ext2_readdir: bad page in #24053

The SD card works fine outside the Linux system - it is not damaged.
Very important information - such errors do not occur in the previous version of kernel: 6.2.22-taskit3.

Could someone helps me, please.

Re: Kernel 2.6.36 and SD card problem

Which MMC driver are you using? AT91 or ATMELMCI?
With the ATMELMCI driver I have had kernel lockups in 2.6.38.X en 2.6.39.X.
With the AT91 driver I have had no problems.

Re: Kernel 2.6.36 and SD card problem

I am using AT91 driver - AT91 SD/MMC Card Interface support (CONFIG_MMC_AT91).

Re: Kernel 2.6.36 and SD card problem

It seems like at91-mci is broken for 2.6.36 an higher, at least we get the same errors in kernel 2.6.38 for at91sam9261 (this is not valid for at91sam9g20). Our 2.6.22 driver is heavily patched to have it working stable.

Re: Kernel 2.6.36 and SD card problem

Hi, have anybody found a solution to this problem? Thank You.

Syndicate content