Ricoh (R5C592) Card reader on Ubuntu

Source: Ubuntu Forums
OS: Ubuntu 8.04 (Hardy Heron)
Date: Sep 3, 2008

The Ricoh (R5C592) Card reader is an internal card reader provided on most laptops including Dell, Lenovo etc. At the time of writing this, this card reader does not work with MMC cards on Ubuntu. Though it is said to work out of the box with SD cards, I don't have one to check this out.

So, If you own a MMC/RS-MMC card, you can follow a few simple steps and get your MMC card to mount on Ubuntu.

Step 1: Let's make sure you indeed have a Ricoh Card Reader. Open a terminal (Applications > Accessories > Terminal) and type the code given below.

lspci | grep Ricoh

The output should be something like this

03:01.0 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller
03:01.1 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 19)
03:01.2 System peripheral: Ricoh Co Ltd R5C843 MMC Host Controller (rev 01)
03:01.3 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter (rev 0a)
03:01.4 System peripheral: Ricoh Co Ltd xD-Picture Card Controller (rev 05)

So, that confirms the card reader is from RIcoh.

1. The format of numbers might be a little different on your computer. For example, it could be 05:01.2. For the next few steps, the correct number from your computer should be used.
2. The line 03:01.2 would look a little different before the fix. We need not worry about it.

Step 2: Configure the card reader as a PCI device. In the terminal we opened a while back, type the following lines, one at a time, pressing enter after completing each line.

sudo setpci -s 03:01.2 0xCA=57
sudo setpci -s 03:01.2 0xCB=02
sudo setpci -s 03:01.2 0xCA=00

You can also login as root and do this. In that case, just remove "sudo" from the code.

Thats it!!. Pop in a MMC card into the reader and the card should mount and open a file manager window.

1. If the card has been encrypted, it wouuld show up in the "Computer" window but it would not mount unless mounted by a suitable program such a truecrypt.
2. These settings would get reset after a reboot, so it is essential to put this code somewhere so that it is read and the card reader is setup during the computer startup. In order to do that, proceed to the next step.

Step 3: Type the below code in the terminal.

gksudo gedit

The text editor should open in "sudo" mode which lets us save the file in the directory /etc/init.d. In a new file type

# Setpci for MMC Cards
sudo setpci -s 03:01.2 0xCA=57
sudo setpci -s 03:01.2 0xCB=02
sudo setpci -s 03:01.2 0xCA=00

and save it in the directory /etc/init.d as setpci or any name you wish to give it.

After doing this, the card reader should work with MMC cards even after rebooting the computer :)


Add a New Comment
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License