Internal card reader on HP 2510 p


back to the HP 2510p main page

Intro
The only "nice to have" thing on the mentioned above laptop, what wasn't working out of the box (with Kubuntu 8.04 since beta, kernel 2.6.24) was the SD and MM card reader.
lspci told me this:
02:06.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev ba)
02:06.1 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller (rev ff)
02:06.2 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 21)
02:06.3 System peripheral: Ricoh Co Ltd R5C843 MMC Host Controller (rev ff)


Some dmesg output on loading the needed modules (sdhci, ricoh-mmc, mmc-block etc.) told, that the hardware is present and identified by modules, but there was no reaction, if I've inserted a card (SD or MMC). Manual mounting was not possible too, because there was no device.

Investigation
From time to time I've tried some sources about this (or not this) issue: But without success... Then I've found some words about the newest change in the kernel 2.6.25:
The next important step was to try openSuse 11 beta live (kernel 2.6.25) - everything was working out of the box!!!
Because my HP 2510p is working quite good with Kubuntu (not even restarting necessary with his great support for s2ram and s2disk...) I would like to stay with this distro.

Solution
Finally, I decided to compile - kernel, if necessary, or the module. But it would be my first time, I have compiled the kernel. So I was a little bit scared to loose my stable system... Now can I say, compiling the whole kernel wasn't necessary. It was only one small file... The solution for the problem on Kubuntu 8.04 using official kernel source 2.6.25.1 from http://kernel.org was (step by step):

1. download the kernel source
wget http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.25.1.tar.bz2

2. unpack
tar jxf linux-2.6.25.1.tar.bz2

3. copy the only one needed file (driver-code for an special ricoh-mmc fake-driver) into a new directory
mkdir ricoh_driver
cp linux-2.6.25.1/drivers/mmc/host/ricoh_mmc.c ricoh_driver/


4. prepare the right Makefile for compiling (don't ask me how I found the right syntax and everything else - I just found one working solution here: http://www.cyberciti.biz/tips/compiling-linux-kernel-module.html; You need a) at least the kernel headers and b) the suitable compilers and tools (gcc, make etc. - full source is possibly not necessary, but I had it installed too; in case of trouble consult the mentioned adress - everything about compiling modules is explained right there, THX to the authors!)
vi ricoh_driver/Makefile

5. add the folowing content to the Makefile:
obj-m = foo.o
KVERSION = $(shell uname -r)
all:
make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(KVERSION)/build M=$(PWD) clean

carefull! you really need the tabs before the "make" command - otherwise there is an error doing "make"

6. save the Makefile

7. do make in the directory with the file:
cd ricoh_driver
make


8. copy the new driver file (ricoh_mmc.ko) into modules folder:
cp ricoh_mmc.ko /lib/modules/2.6.24-16-generic/kernel/drivers/mmc/host/

9. as a precaution reload all driver around:
modprobe -r sdhci
modprobe -r ricoh_mmc
modprobe -r mmc_block
modprobe -r mmc_core
modprobe sdhci
(sdhci loads the others, I guess)

10. put a card (SD and MMC works in my machine) and enjoy (popup window leads You through...)

If it works with other distribution, I would like to know about, if it's possible. THX!

Wojtek
There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki