h1940 - kernel 2.6.20-rc1 can't read my SD card

From: Carlo Palma <carlopalma_at_salug.it>
Date: Tue, 23 Jan 2007 17:59:25 +0100

Hi,
first of all thanks for the h1940 support :D

I just want to report that using the preocompiled kernel 2.6.20-rc1 from
handhelds.org with the initrd-eabi,
http://handhelds.org/moin/moin.cgi/HpIpaqH1940Downloads
it boot fine, but the kernel can't
read my Kingston 1GB SD Standard card.
http://www.kingston.com/flash/securedigital.asp

[ssh-ing to the h1940]
root_at_h1940:~$ dmesg
(...)
mmci-s3c2410: probe: mapped sdi_base=c5200000 irq=37 irq_cd=49
<7>PM: Adding info for No Bus:mmc0
<6>mmci-s3c2410: initialisation done.
(...)
<4>mmc0: host does not support reading read-only switch. assuming
write-enable.
<7>PM: Adding info for mmc:mmc0:3394
<3>mmcblk0: unable to set block size to 512: 2
<4>mmcblk: probe of mmc0:3394 failed with error -22
<7>PM: Removing info for mmc:mmc0:3394

so the kernel can't build the devices /dev/mmcblkX

randomly, it happens so:
<4>mmc0: host does not support reading read-only switch. assuming
write-enable.
<7>PM: Adding info for mmc:mmc0:3394
<3>mmcblk1: unable to set block size to 512: 2
<4>mmcblk: probe of mmc0:3394 failed with error -22
<7>PM: Removing info for mmc:mmc0:3394
<4>mmc0: host does not support reading read-only switch. assuming
write-enable.
<7>PM: Adding info for mmc:mmc0:3394
<6>mmcblk2: mmc0:3394 SD01G 1006080KiB
<6> mmcblk2:<3>mmcblk2: error 2 sending read/write command
<4>end_request: I/O error, dev mmcblk2, sector 0
<3>Buffer I/O error on device mmcblk2, logical block 0
<3>mmcblk2: error 2 sending read/write command
<4>end_request: I/O error, dev mmcblk2, sector 0
<3>Buffer I/O error on device mmcblk2, logical block 0
<4> unknown partition table
<3>mmcblk2: error 2 sending read/write command
<4>end_request: I/O error, dev mmcblk2, sector 8
<3>Buffer I/O error on device mmcblk2, logical block 1
<3>mmcblk2: error 2 sending read/write command
<4>end_request: I/O error, dev mmcblk2, sector 16
<3>Buffer I/O error on device mmcblk2, logical block 2
<3>mmcblk2: error 2 sending read/write command
<4>end_request: I/O error, dev mmcblk2, sector 24
<3>Buffer I/O error on device mmcblk2, logical block 3
<3>mmcblk2: error 2 sending read/write command
<4>end_request: I/O error, dev mmcblk2, sector 0
<3>Buffer I/O error on device mmcblk2, logical block 0

in this case, the kernel create a device /dev/mmcblk2
but due to the I/O errors, it is almost unusable, the kernel still can't
read/write the partition table.

root_at_h1940:$ cat /sys/devices/platform/s3c2410-sdi/mmc0\:3394/name
SD01G
root_at_h1940:$ cat /sys/devices/platform/s3c2410-sdi/mmc0\:3394/oemid
0x544d
root_at_h1940:$
cat /sys/devices/platform/s3c2410-sdi/mmc0\:3394/block\:mmcblk2/size
2012160

The output of a kernel compiled with the MMC_DEBUG option is here:
http://www.salug.it/~carlopalma/ipaq/linux-2.6.20-rc1/log_mmcdebug

Btw I'll need to take a closer look to the kernel code before to
understand how to solve this problem.

Considering:
that the SD card works very well with ipaq and kernel 2.6.17, and with my
Desktop PC;
that I've tested differents partitions tables, and no partitions at all
and I take always the same error;
that another card of the same brand and model (512 MB) has the same
problem;
that I can't test differents brand or model now :|

I think that it isn't a card hardware problem, but some kind of
unsupported (broke support) model specification?
The product is sealed has compliant with the SD Card Associations
Specifications... :D

Until now, I manage to cross-compile the kernel.
I apply some of the patch found
http://www.rtp-net.org/ipaq/patches/2.6.20-rc1/WIP/
using precompiled armv4t gnueabi toolchains.

I the next days I'll continue to study the s3c2410mci.c .. and I'll search
to understand what's changed from 2.6.17 to 2.6.20 about the mmc support
and to try to solve this problem.
Maybe forcing the block size to 512... could be a king of solution.
I'll see.
I'll begin from the 'random SD/MMC card recognition failures', discussed
in this thread: http://lkml.org/lkml/2006/11/23/137

Any clue? Have you any working card? Any similar problem?
Maybe buy a different SD card could be a kind of solution.
Btw I think it will be funny to have to do some debug.

Thanks,
Carlo Palma

Received on Tue Jan 23 2007 - 12:14:17 EST

This archive was generated by hypermail 2.2.0 : Tue Jan 23 2007 - 12:14:39 EST