Lenovo Thinkpad T520 does not support SD cards in Ricoh 4-in-1 card reader

Asked by Tim McCormack

My Lenovo Thinkpad T520 is listed as having a supported card reader, but the reader does not work under Ubuntu 11.04. No card is detected.

Under Windows 7, I was able to get it working by installing the Ricoh 4-in-1 card reader driver from Lenovo's website.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu-Certification Edit question
Assignee:
No assignee Edit question
Solved by:
Tim McCormack
Solved:
Last query:
Last reply:
Revision history for this message
Brendan Donegan (brendan-donegan) said :
#1

Hi Tim,

The Thinkpad T520 we tested does have a working card reader but from what I can see this was not a 4-in-1. Was the 4-in-1 optional when you bought the T520 or did it just come with it? I'll try and do a bit more research to find out if the system we tested definitely doesn't have a 4-in-1.

Revision history for this message
Tim McCormack (phyzome) said :
#2

I bought mine recently from this page:

http://shop.lenovo.com/us/thinkpad-laptops-with-dos.shtml

On the "System expansion slots" choice screen, there are two options:

1) Express Card Slot & 4 in 1 Card Reader
2) Express Card Slot & 4 in 1 Card Reader & Smart Card Reader

I chose the first one. I have only actually tested an SD card in it, since I don't have other SD formats or MMC. I could probably track one down.

Let me know if there are any commands I should run or logs I should pull to diagnose this.

Revision history for this message
Daniel Manrique (roadmr) said :
#3

Hi,

I have a T520 and it's reported to be working. I can double-check tomorrow, but here's one thing you can do to ensure we have the same card reader device.

Open a terminal (ctrl-alt-t) and type:

lspci -nn

A listing of devices connected to the PCI bus will appear. Near the end you should see a line like this:

02:00.0 System peripheral [0880]: Ricoh Co Ltd Device [1180:e823] (rev 07)

We mainly care about the second set of numbers in square brackets [1180:e823]. If you have the same number, then it's the same card reader and it should work. Either way, I'd appreciate if you could post that line here for us to see, in case you have a different reader.

Second, I remember special support for this card reader was added to the 2.6.38-11 kernel for Ubuntu 11.04. So could you run update manager, ensure you have all the most recent updates, and try again?

If you want to check the kernel version you're running, open a terminal (as above) and type:

uname -a

Similarly I'd appreciate if you could post that information here.

If after this (confirming that the card reader is the same and updating the kernel) it still doesn't work, let us know and we'll probably ask you to file a bug report as it may be a yet-unseen variant of the T520. But we'll cross that bridge when we get to it.

Revision history for this message
Tim McCormack (phyzome) said :
#4

From lspci:

0d:00.0 System peripheral [0880]: Ricoh Co Ltd Device [1180:e823] (rev 05)

System was already up to date. Running 2.6.38-12 kernel.

Revision history for this message
Brendan Donegan (brendan-donegan) said :
#5

Looks like just the rev number is different. I wonder to what extent that could be an issue?

Revision history for this message
Daniel Manrique (roadmr) said :
#6

Tim, could you try opening a terminal and running this series of commands:

sudo setpci -v -d 1180:e823 f9.B=fc
sudo setpci -v -d 1180:e823 150.B=10
sudo setpci -v -d 1180:e823 f9.B=00
sudo setpci -v -d 1180:e823 fc.B=01
sudo setpci -v -d 1180:e823 e1.B=32
sudo setpci -v -d 1180:e823 fc.B=00

sudo rmmod sdhci_pci
sudo rmmod sdhci
sudo modprobe sdhci
sudo modprobe sdhci_pci

then try inserting a card and seeing if it works.

I checked my T520 and it has a rev 05 card reader, looks exactly like yours at least from lspci output. So at least we have identical hardware :)

Revision history for this message
Tim McCormack (phyzome) said :
#7

That worked beautifully!

Looks like that has to be run every time the computer is started or woken up from suspend, so I made a script out of it. Good enough for now.

Let me know if there is anything else I can do.

Revision history for this message
Brendan Donegan (brendan-donegan) said :
#8

Hi Tim,

So we can check a few more things, please give the full output from 'uname -a'

Thanks,

Revision history for this message
Tim McCormack (phyzome) said :
#9

timmc@thunk:~$ uname -a
Linux thunk 2.6.38-12-generic #51-Ubuntu SMP Wed Sep 28 14:27:32 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

(Meant to include the full printout earlier, but hit submit by accident.)

Revision history for this message
Tim McCormack (phyzome) said :
#10

Update: Today this script suddenly stopped working, with the following output:

setpci: Warning: No devices selected for "f9.B=fc".
setpci: Warning: No devices selected for "150.B=10".
setpci: Warning: No devices selected for "f9.B=00".
setpci: Warning: No devices selected for "fc.B=01".
setpci: Warning: No devices selected for "e1.B=32".
setpci: Warning: No devices selected for "fc.B=00".

I ran lspci again, and here are the relevant ("Ricoh") lines:

0d:00.0 System peripheral [0880]: Ricoh Co Ltd MMC/SD Host Controller [1180:e822] (rev 05)
0d:00.3 FireWire (IEEE 1394) [0c00]: Ricoh Co Ltd FireWire Host Controller [1180:e832] (rev 04)

It looks like the device spec has changed! I edited the script, and it works again.