# SD Card Reader on my Laptop

## Blutch

Hello everybody!

I'm having some trouble to make my SD card working on my laptop (AOpen 1557GLS).

The 2 following lines, from my lspci output, identify my SD Card Reader:

```
02:09.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev ac)

02:09.1 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev ac)
```

When I plug in a SD card, I can see the following lines in /var/log/messages:

```
Jul 27 18:20:17 localhost kernel: pccard: PCMCIA card inserted into slot 0

Jul 27 18:20:17 localhost kernel: pcmcia: registering new device pcmcia0.0
```

And when my SD card is plugged in, here is the empty output of cat /proc/scsi/scsi:

```
Attached devices:
```

And I don't have anything like /dev/sd*

Therefore, I don't have anything to mount...

I'm using a 1Gb SD Card, which works perfectly in my digital camera and under Windows (plugged into the same card reader).

By the way, I'm using a pcmcia ethernet controller which works like a charm.

I enabled SCSI and PCMCIA/Cardbus support in the kernel (2.6.17-r4):

```
[*]

Device Drivers  --->

  SCSI device support  --->

    [*]   legacy /proc/scsi/ support 

    <*>   SCSI disk support

    <*>   SCSI OnStream SC-x0 tape support

    <*>   SCSI CDROM support

    <*>   SCSI generic support

Bus options (PCI, PCMCIA, EISA, MCA, ISA)  --->

  PCCARD (PCMCIA/CardBus) support  --->

    <*> PCCard (PCMCIA/CardBus) support

    <*>   16-bit PCMCIA support

    [*]     Load CIS updates from userspace (EXPERIMENTAL)

    [*]     PCMCIA control ioctl (obsolete)

    <*>   CardBus yenta-compatible bridge support

```

Can someone help ? What did I forget to do ? What error am I making ?

Thanks a lot,

Blutch

----------

## chrismortimore

Have you had a look in "MMC/SD Card support" in "Device Drivers"?

----------

## asiobob

You need a 2.6.17 or greater kernel

----------

## Blutch

 *chrismortimore wrote:*   

> Have you had a look in "MMC/SD Card support" in "Device Drivers"?

 Yes it is enabled:

```

<*> MMC support

[ ]   MMC debugging

<*>   MMC block device driver

<*>   Secure Digital Host Controller Interface support  (EXPERIMENTAL)

< >   Winbond W83L51xD SD/MMC Card Interface support

```

 *ASIO_BOB wrote:*   

> You need a 2.6.17 or greater kernel

 I wrote I'm using a 2.6.17-r4 kernel

----------

## chrismortimore

Take a look at sys-apps/pcmciautils, I'm not overly sure myself what they do, but I have them installed and my pcmcia stuff works fine...

----------

## Blutch

 *chrismortimore wrote:*   

> Take a look at sys-apps/pcmciautils, I'm not overly sure myself what they do, but I have them installed and my pcmcia stuff works fine...

 

That sounds interesting. I saw it uses the "udev" USE variable, maybe it'll help create the correct /dev/xxx. Do you know if I have anything to configure, or do I just have to let it act in the background for me ?

I'll give it a try tonight when i'll be back home.

----------

## Lloeki

Mine is:

```
$ lspci |grep Ricoh

02:01.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev b3)

02:01.1 FireWire (IEEE 1394): Ricoh Co Ltd R5C552 IEEE 1394 Controller (rev 08)

02:01.2 Class 0805: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 17)

02:01.3 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter (rev 08)

02:01.4 System peripheral: Ricoh Co Ltd xD-Picture Card Controller (rev 03)

```

I did a bit of research some time ago (3~6 months) and ended up in a dead end: pcmcia-based laptop Ricoh card readers are not documented, and Ricoh refuses to give any information. So the only way to write a driver is reverse engineer it, which has not been done TTBOMK.

It might have changed though.

----------

## Blutch

 *Lloeki wrote:*   

> I did a bit of research some time ago (3~6 months) and ended up in a dead end: pcmcia-based laptop Ricoh card readers are not documented, and Ricoh refuses to give any information. So the only way to write a driver is reverse engineer it, which has not been done TTBOMK.
> 
> It might have changed though.

 

Do you mean that if the solution hasn't changed, there is NO solution to make a Ricoh adapter work under linux ???

Doesn't a wrapper exist, that can use a windows driver (like ndis wrapper for wireless controllers) ?

----------

## Blutch

Did anyone else have any experience with a Ricoh card reader ?

I'm still open to any idea that could help make it work.

----------

## Whoopie

Hi,

the "Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter" is supported by sdhci kernel module. It's already included in vanilla kernel, but you should use a 2.6.18-rc? kernel because the driver was improved a lot.

Best regards,

Whoopie

----------

## Blutch

Thanks a lot for your answer.

The SDHCI is already compiled in my kernel (2.6.17-r4):

```

<*>   Secure Digital Host Controller Interface support  (EXPERIMENTAL)

```

So, in principle, it should work, shouldn't it ?

Anyway, I'll try to use it with the newer rc kernel, maybe it'll work.

----------

## kilianh

I have the exact same symptoms, I gave up trying to use my sd card reader a long time ago when I saw the new sd interface driver in the 2.6.17 kernel (my laptop is 2,5 years old).

It's just that sdhci doesn't seem to do anything at all (except loading) so I guess we will have to wait for 2.6.18  :Sad:  Once this works though my laptop will be 100% supported (Samsung P30)

----------

## blorby

i've got an asus laptop with  a Ricoh R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter, a R5C592 Memory Stick Bus Host Adapter and a 2.6.17-r4 kernel

it seems that MMC + SDHCI works for SD cards and not for MS type (dont know exactly why...)

but, the mount point is not a /dev/scsi/something but more something like /dev/mmcblk0p1

----------

## Lloeki

just upgraded.

$ uname -r

2.6.17-suspend2-r4

mine (sd/mmc) works (r/w tested) with sdhci.

ms doesn't (tested), as it's obviously not sdhci-compliant.

remember that there's one slot but those are really different devices packed in one, so another driver is needed for ms/cf/xd/whatever.

you can see it in multiple places: 

- windows device manager (a must-have to get info on unsupported/undetected hardware under linux)

- windows explorer (in that case, multiple drive letters => multiple devices)

- lspci

----------

## blorby

true 

it seems the right driver for the MS doesnt even exist

----------

## RushPL

Hey, I don't want to spawn a new topic so I'll just post here ...

I owe an ASUS laptop with a a "03:01.2 Class 0805: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 17)".

I've followed the wiki on http://gentoo-wiki.com/HOWTO_SD_and_MMC_card_readers

I use a kernel 2.6.18-suspend2 - with every required option enabled.

My loaded(relevant) modules are:

```

rushpod rush # lsmod

Module                  Size  Used by

msdos                   6912  0

vfat                    9216  0

fat                    38940  2 msdos,vfat

sdhci                  13708  0

mmc_block               5512  0

mmc_core               17408  2 sdhci,mmc_block

```

After modprobing the 'sdhci' module I get the following messages in 'dmesg':

```

sdhci: Secure Digital Host Controller Interface driver, 0.12

sdhci: Copyright(c) Pierre Ossman

sdhci: SDHCI controller found at 0000:03:01.2 [1180:0822] (rev 17)

ACPI: PCI Interrupt 0000:03:01.2[C] -> GSI 19 (level, low) -> IRQ 20

mmc0: SDHCI at 0xfe8ff400 irq 20 DMA

```

And guess what ? I get NO DEVICE /dev/mmcblk0p1 whatsoever.

```

rushpod ~ # ls /dev/mmc*

ls: cannot access /dev/mmc*: No such file or directory

```

Since it appears to be all perfectly set I humbly request for your support.

Regards,

Rush

----------

