# SD Card slot not working after upgrade to kernel 3.6 & 3.7

## keba

Hi,

I've got a strange problem: I updated my kernel from 3.4.3 to 3.6.3, and all of a sudden, the SD slot isn't working any more. Basically, the device is still recognized but when I insert an SD card, nothing happens. Is this related to kernel 3.6? Or is there a new kernel option I need to activate for it to work?

Thanks

keba

----------

## fdelente

If it can help, I had once the same problem under Slackware, I had to use the « sg_map » command to be able to mount an SD-Card.

----------

## keba

it's really strange. Under kernel 3.4, when I insert an SD card, KDE recognises it right away. Under 3.6, nothing...

dmesg (kernel 3.6) says:

```

[    1.678678] sdhci: Secure Digital Host Controller Interface driver

[    1.679920] sdhci: Copyright(c) Pierre Ossman

[    1.681214] sdhci-pci 0000:05:00.2: SDHCI controller found [1180:0822] (rev 21)

[    1.683543] sdhci-pci 0000:05:00.2: Will use DMA mode even though HW doesn't fully claim to support it.

[    1.684773] sdhci-pci 0000:05:00.2: setting latency timer to 64

```

lspci:

```
05:00.2 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 21)
```

[/code]

----------

## Clad in Sky

Maybe you're missing something in your kernel.

I found this in a documentation on how to install Gentoo on a T420:

"You need to enable Device Drivers -> MMC/SD/SDIO card support -> Secure Digital Host Controller Interface support (MMC_SDHCI) in your kernel to get it work."

I'm not sure, though, if this is only for the Smartcard reader.

If the card reader is connected via USB internally, you should also choose Device Drivers → SCSI Device Support → SCSI Disk support + in the same menu Probe all LUNs on each SCSI device.

----------

## keba

Well, this is what's enabled in my kernel. This identical setup worked fine in kernel 3.4. Note: I enabled "SDHCI platform and OF driver helper" to see whether it would help, but no...

```

Device Drivers -->

    MMC/SD/SDIO card support -->

        --- MMC/SD/SDIO card support

        [ ]   MMC debugging

        [ ]   Assume MMC/SD cards are non-removable (DANGEROUS)

        [ ]   MMC host clock gating (EXPERIMENTAL)

              *** MMC/SD/SDIO Card Drivers ***

        <*>   MMC block device driver

        (8)     Number of minors per block device

        [*]     Use bounce buffer for simple hosts

        < >   SDIO UART/GPS class support

        < >   MMC host test driver

              *** MMC/SD/SDIO Host Controller Drivers ***

        <*>   Secure Digital Host Controller Interface support

        <*>   SDHCI support on PCI bus

        [*]       Ricoh MMC Controller Disabler  (EXPERIMENTAL)

        < >   SDHCI platform and OF driver helper

        < >   Winbond W83L51xD SD/MMC Card Interface support

        < >   TI Flash Media MMC/SD Interface support  (EXPERIMENTAL)

        < >   MMC/SD driver for Ricoh Bay1Controllers (EXPERIMENTAL)

        < >   ENE CB710 MMC/SD Interface support

        < >   VIA SD/MMC Card Reader Driver

        < >   VUB300 USB to SDIO/SD/MMC Host Controller support

        < >   USB SD Host Controller (USHC) support

```

Oh, and Device Drivers → SCSI Device Support → SCSI Disk support + in the same menu Probe all LUNs on each SCSI device have been enabled all along...

----------

## Clad in Sky

Can you mount the card manually? Perhaps it's just not mounted.

----------

## keba

I wish. It would show up in KDE if I could. It doesn't even show up in /dev though!!! With kernel-3.4 it does.

----------

## Clad in Sky

Did you make the new kernel with the old config via make oldconfig? If not, perhaps you're missing a driver (although I don't actually believe so).

Try lspci -n and paste the output here to see which kernel drivers you need:

http://kmuto.jp/debian/hcl/

Also worked with the output you provided above and yielded:

http://kmuto.jp/debian/hcl/RICOH/R5C822+SD／SDIO／MMC／MS／MSPro+Host+Adapter+-+R5C592+Memory+Stick+Bus+Host+Adapter

At the end of the list, there is:

R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter

->> Works with the extra Modules sdhci and mmc_block.

Does that help at all?

Edit:

From what you posted, you already have that. Perhaps building them as modules works? If not, there's a mail address there where you can send a question.

----------

## keba

That webpage you posted is really helpful   :Smile:   Unfortunately it uses information for kernel 3.2. Yes, I did an oldconfig. And I do have the drivers. I am starting to think that there must be a bug in kernel 3.6...

----------

## keba

After an upgrade to kernel 3.6.7 the issue is still there   :Sad: 

----------

## keba

These people are having the same problem. They claim it's a problem with kernel-3.6.x, which may be solved in 3.7.

When I insert an SD card, nothing happens in dmesg, or /var/log/messages. The card is not detected by the kernel at all. Nor by udev, since udevadm monitor doesn't show anything.

----------

## keba

It seems it's not just my built-in SD slot, but also an external USB card reader (with SD, CF, etc.). It is not working either.   :Sad:   Any ideas?

----------

## keba

This is the output from dmesg | grep sdhci, running kernel 3.7

```

[    1.672613] sdhci: Secure Digital Host Controller Interface driver

[    1.673970] sdhci: Copyright(c) Pierre Ossman

[    1.675281] sdhci-pci 0000:05:00.2: SDHCI controller found [1180:0822] (rev 21)

[    1.677566] sdhci-pci 0000:05:00.2: Will use DMA mode even though HW doesn't fully claim to support it.

[    1.678872] sdhci-pci 0000:05:00.2: setting latency timer to 64

[    1.683034] sdhci-pltfm: SDHCI platform and OF driver helper

```

It's still not working   :Sad: 

----------

## ppurka

Paste the output of "lspci -n" into http://kmuto.jp/debian/hcl/ and check the module for your sdcard controller.

If you use "make oldconfig" to configure your kernel, you should rerun "make nconfig" and check. I have seen the kernel options get deselected when using "make oldconfig" because the options tend to move around and not get automatically enabled.

----------

## keba

That's the strange thing. My modules are enable as they should be: sdhci-pci. It loads, as dmesg shows, but then no device node gets created. Is this a udev problem?

----------

## billium

@keba

I have the same Richo controller on a thinkpad X61s and can mount SD cards o.k.

I run ~amd64, keep it up-to-date, it is kernel 3.7.1 and no special udev rules.

I can do other tests if it helps ... just ask here.

I am using pmount as I have broken razor-qt at the moment.

@ppurka thanks for nconfig  .. never seen that before  :Smile: 

----------

## keba

Hi Billium,

could you send me your .config for the kernel? Maybe it will help and I can figure it out. I'm quite sure some kernel option got deselected between kernel 3.4 and 3.6, but I have no idea which...

PS: I'm on a Thinkpad X61s too.

Thanks

----------

## billium

check pm

----------

## keba

Thank you very much!   :Smile: 

----------

## mlouis

having the same problem, resolved with

https://patchwork.kernel.org/patch/1936791/

----------

## keba

Nice, thanks. It seems this was integrated in kernel 3.8. I'll see if it works and report back.

----------

## keba

I just installed kernel 3.8, but it still does not work! This is driving me crazy. I just started up kernel 3.4, and the SD card was recognised immediately.

----------

## fbcyborg

Hi guys, just updated to 3.8.5 and the bug is still there.

----------

## sbdmmg

Hi,

   Same problem here, running 3.8.13 on Lenovo X1 Carbon.

from lspci:

```

02:00.0 System peripheral: Ricoh Co Ltd MMC/SD Host Controller (rev 07)

```

from dmesg:

```

[ 3403.828219] sdhci: Secure Digital Host Controller Interface driver

[ 3403.828224] sdhci: Copyright(c) Pierre Ossman

[ 3407.397040] sdhci-pci 0000:02:00.0: SDHCI controller found [1180:e822] (rev 7)

[ 3407.424503] mmc0: SDHCI controller on PCI [0000:02:00.0] using DMA

```

However, nothing happens when a card is inserted in the reader.

Any news on this issue?

Thanks,

Davide

P.S. here is the additional output from dmesg when re-compiling with 'MMC_DEBUG'

http://pastebin.com/d8UqRsgm

----------

## alinefr

 *sbdmmg wrote:*   

> Hi,
> 
>    Same problem here, running 3.8.13 on Lenovo X1 Carbon.
> 
> from lspci:
> ...

 

Did you enabled CONFIG_MEMSTICK_R592?

----------

## sbdmmg

Hi alinefr,

  Thanks for your suggestion. Yes, I am using this flag

```
# grep CONFIG_MEMSTICK_R592 .config

CONFIG_MEMSTICK_R592=m
```

Unfortunately that doesn't seem to be the problem.

Below is the list of relevant flags I have enabled:

```

Device Drivers --->

       MMC/SD/SDIO card support --->

                   <M> Secure Digital Host Controller Interface support

                   <M> SDHCI support on PCI bus

                   <M> SDHCI support on PCI bus -> Ricoh MMC Controller Disabler

                   <M> MMC/SD driver for Ricoh Bay1Controllers (EXPERIMENTAL)

       <M> Sony MemoryStick card support (EXPERIMENTAL)  --->

           <M>   Ricoh R5C592 MemoryStick interface support

```

Thanks for any suggestion you might have.

Davide

----------

## nativemad

Hi, 

sys-block/rts_pstor did wonders on my RTS5209!   :Wink: 

HTH, Cheers

----------

## fbcyborg

I'm still wondering if there is some issue on the kernel...

----------

## fbcyborg

I was correct when I suspected there was something wrong with the kernel.

I didn't do anything except upgrading the kernel to version 3.10.0 and the SD card reader started working again.

 :Rolling Eyes:   :Rolling Eyes: 

----------

