Linux Mint 13: Enabling the SD Card Reader on the Toshiba Satellite P870

I start­ed using SD cards recent­ly and had a heck of a time using it on my lap­top at first. I tried using my 32 GB SDHC card in the USB adapter, to no avail, then I found the SD slot and it still did not work either. It turned out that the dri­ver was not load­ing by default. This is a com­mon prob­lem in Lin­ux, as the devices that are less com­mon­ly used are not going to always “just work”. You have to often get the dri­ver your­self and install it.

Get­ting it work­ing was not triv­ial, I had to fig­ure out which dri­ver to get, which took some guess­work. It turns out that this lap­top uses a Real­tek RTS5229 for its SD card inter­face. I found this infor­ma­tion with lsp­ci.

$ lspci
00:00.0 Host bridge: Intel Corporation Ivy Bridge DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Ivy Bridge PCI Express Root Port (rev 09)
00:02.0 VGA compatible controller: Intel Corporation Ivy Bridge Graphics Controller (rev 09)
00:14.0 USB controller: Intel Corporation Panther Point USB xHCI Host Controller (rev 04)
00:16.0 Communication controller: Intel Corporation Panther Point MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation Panther Point USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation Panther Point High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation Panther Point PCI Express Root Port 1 (rev c4)
00:1c.1 PCI bridge: Intel Corporation Panther Point PCI Express Root Port 2 (rev c4)
00:1c.4 PCI bridge: Intel Corporation Panther Point PCI Express Root Port 5 (rev c4)
00:1d.0 USB controller: Intel Corporation Panther Point USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation Panther Point LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation Panther Point 6 port SATA Controller [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation Panther Point SMBus Controller (rev 04)
01:00.0 VGA compatible controller: NVIDIA Corporation Device 0de9 (rev a1)
07:00.0 Ethernet controller: Atheros Communications Inc. AR8161 Gigabit Ethernet (rev 10)
08:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device 8723
09:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. Device 5229 (rev 01)

Note the unas­signed Real­tek device towards the bot­tom:

09:00.0 Unas­signed class [ff00]: Real­tek Semi­con­duc­tor Co., Ltd. Device 5229 (rev 01)

The dri­ver is obtained from the Real­tek dri­ver site under the Lin­ux sec­tion.

Down­load the files, uncom­press, extract to a direc­to­ry. Then change to the direc­to­ry and make, install and add the depen­den­cy.

Here are the com­mands to build the dri­ver and install as a depen­den­cy.

make
sudo make install
sudo depmod

The out­put will look sim­i­lar to the fol­low­ing:

~/Downloads/Realtek_RTS5229_Linux_Driver_v1.07/rts5229 $ ls
debug.h         ms.c           rtsx_card.h  rtsx_sys.h
define.debug    ms.h           rtsx_card.o  rtsx_transport.c
define.h        ms.o           rtsx_chip.c  rtsx_transport.h
define.release  README.txt     rtsx_chip.h  rtsx_transport.o
general.c       rts5229.ko     rtsx_chip.o  sd.c
general.h       rts5229.mod.c  rtsx.h       sd.h
general.o       rts5229.mod.o  rtsx.o       sd.o
Makefile        rts5229.o      rtsx_scsi.c  trace.h
modules.order   rtsx.c         rtsx_scsi.h
Module.symvers  rtsx_card.c    rtsx_scsi.o
 ~/Downloads/Realtek_RTS5229_Linux_Driver_v1.07/rts5229 $ make
cp -f ./define.release ./define.h
make -C /lib/modules/3.2.0-30-generic/build/ SUBDIRS=/home/ccase/Downloads/Realtek_RTS5229_Linux_Driver_v1.07/rts5229 modules
make[1]: Entering directory `/usr/src/linux-headers-3.2.0-30-generic'
  CC [M]  /home/ccase/Downloads/Realtek_RTS5229_Linux_Driver_v1.07/rts5229/rtsx.o
  CC [M]  /home/ccase/Downloads/Realtek_RTS5229_Linux_Driver_v1.07/rts5229/rtsx_chip.o
  CC [M]  /home/ccase/Downloads/Realtek_RTS5229_Linux_Driver_v1.07/rts5229/rtsx_transport.o
  CC [M]  /home/ccase/Downloads/Realtek_RTS5229_Linux_Driver_v1.07/rts5229/rtsx_scsi.o
  CC [M]  /home/ccase/Downloads/Realtek_RTS5229_Linux_Driver_v1.07/rts5229/rtsx_card.o
  CC [M]  /home/ccase/Downloads/Realtek_RTS5229_Linux_Driver_v1.07/rts5229/general.o
  CC [M]  /home/ccase/Downloads/Realtek_RTS5229_Linux_Driver_v1.07/rts5229/sd.o
  CC [M]  /home/ccase/Downloads/Realtek_RTS5229_Linux_Driver_v1.07/rts5229/ms.o
  LD [M]  /home/ccase/Downloads/Realtek_RTS5229_Linux_Driver_v1.07/rts5229/rts5229.o
  Building modules, stage 2.
  MODPOST 1 modules
  LD [M]  /home/ccase/Downloads/Realtek_RTS5229_Linux_Driver_v1.07/rts5229/rts5229.ko
make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-30-generic'
 ~/Downloads/Realtek_RTS5229_Linux_Driver_v1.07/rts5229 $ sudo make install
cp rts5229.ko /lib/modules/3.2.0-30-generic/kernel/drivers/scsi -f
 ~/Downloads/Realtek_RTS5229_Linux_Driver_v1.07/rts5229 $ sudo depmod

After a reboot, every­thing worked fine and it showed up just fine.

Screenshot from 2013-01-28 01:26:17

3 thoughts on “Linux Mint 13: Enabling the SD Card Reader on the Toshiba Satellite P870”

  1. Bril­liant! I’ve been try­ing for about a mon­th to get the sd card work­ing. After doing this I just made it swap with part­ed, edit­ed fstab and turned swapon.
    Thank you.

Leave a Reply

Your email address will not be published. Required fields are marked *