Fixing SDHC access in the Orion/Mainline kernel
From ComputingPlugs
There is a bug in the Orion or Mainline kernel that affects access to a SDHC SD memory card. The original 2.6.22.18 Feroceon kernel that came with the Sheeva Plug does not have this issue. Non-SDHC memory cards are not affected either. The problem shows up when you plug in a SDHC memory card into the SD slot. The kernel will continuously print
mmc0: error -110 whilst initialising SD card
every second or so, until you remove the SDHC memory card. There is a patch available here, or if you like, download the file here. Giving credit where credit is due, I found the patch and instructions to it here.
I applied the patch to the mainline kernel v2.6.30-rc3. It should work on the orion kernel as well according to the message thread. To get the mainline kernel, follow these instructions. Once you have the kernel source, copy the patch file to the source directory and type:
patch -p1 < mvsdio.patch
and it should respond with:
patching file drivers/mmc/host/mvsdio.c patching file drivers/mmc/core/core.c
If instead you see something like:
can't find file to patch at input line 3 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |--- a/drivers/mmc/host/mvsdio.c.orig 2009-04-14 20:51:48.000000000 +0000 |+++ b/drivers/mmc/host/mvsdio.c 2009-04-19 15:58:42.261724324 +0000 -------------------------- File to patch:
It means that the patch file is not in the right place. Make sure you put the patch file in the kernel source's top most level:
drwxr-xr-x 24 ktung ktung 4096 2009-04-29 19:14 arch drwxr-xr-x 2 ktung ktung 4096 2009-04-30 15:03 block -rw-r--r-- 1 ktung ktung 18693 2009-04-29 19:14 COPYING -rw-r--r-- 1 ktung ktung 93847 2009-04-29 19:14 CREDITS drwxr-xr-x 3 ktung ktung 4096 2009-04-30 15:01 crypto drwxr-xr-x 83 ktung ktung 12288 2009-04-30 15:03 Documentation drwxr-xr-x 84 ktung ktung 4096 2009-04-30 15:03 drivers drwxr-xr-x 32 ktung ktung 4096 2009-04-30 15:03 firmware drwxr-xr-x 70 ktung ktung 12288 2009-04-30 15:03 fs drwxr-xr-x 21 ktung ktung 4096 2009-04-30 15:01 include drwxr-xr-x 2 ktung ktung 4096 2009-04-30 15:01 init drwxr-xr-x 2 ktung ktung 4096 2009-04-30 15:01 ipc -rw-r--r-- 1 ktung ktung 2430 2009-04-29 19:14 Kbuild drwxr-xr-x 6 ktung ktung 12288 2009-04-30 15:03 kernel drwxr-xr-x 6 ktung ktung 12288 2009-04-30 15:03 lib -rw-r--r-- 1 ktung ktung 147406 2009-04-30 15:03 MAINTAINERS -rw-r--r-- 1 ktung ktung 55019 2009-04-30 15:03 Makefile drwxr-xr-x 2 ktung ktung 4096 2009-04-30 15:01 mm -rw-r--r-- 1 ktung ktung 1274 2009-04-30 15:00 mvsdio.patch drwxr-xr-x 47 ktung ktung 4096 2009-04-30 15:01 net -rw-r--r-- 1 ktung ktung 17080 2009-04-29 19:14 README -rw-r--r-- 1 ktung ktung 3172 2009-04-29 19:14 REPORTING-BUGS drwxr-xr-x 7 ktung ktung 4096 2009-04-29 19:14 samples drwxr-xr-x 11 ktung ktung 4096 2009-04-30 15:01 scripts drwxr-xr-x 7 ktung ktung 4096 2009-04-30 15:01 security drwxr-xr-x 21 ktung ktung 4096 2009-04-30 15:01 sound drwxr-xr-x 2 ktung ktung 4096 2009-04-30 15:01 usr drwxr-xr-x 3 ktung ktung 4096 2009-04-29 19:14 virt
and you run the patch command in the same directory. Once patched, build the kernel and it should work.
|
|
Click here to leave a comment
Did you find this page useful? |
||


May 18 2009 3:26 pm
Please keep comments clean and constructive. Inappropriate comments will be removed. Thank you.
Nov 29 2009 12:59 pm
Kenny, I'm sorry but that patch just increases some timeouts. It does not change anything for me. Could you bisect for what commit performance improved?
Dec 07 2009 11:37 am
Yes, the patch seems to only increase the timeout period. But it does make the orion kernel work with sdhc. I'm not sure what you mean by performance improved? I notice the speed was faster when I use the newer mainline kernel than the orion kernel with the patch, if that's what you meant.