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


I started using SD cards recently and had a heck of a time using it on my laptop 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 driver was not loading by default. This is a common problem in Linux, as the devices that are less commonly used are not going to always “just work”. You have to often get the driver yourself and install it.

Getting it working was not trivial, I had to figure out which driver to get, which took some guesswork. It turns out that this laptop uses a Realtek RTS5229 for its SD card interface. I found this information with lspci.

$ 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 unassigned Realtek device towards the bottom:

09:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. Device 5229 (rev 01)

The driver is obtained from the Realtek driver site under the Linux section.

Download the files, uncompress, extract to a directory. Then change to the directory and make, install and add the dependency.

Here are the commands to build the driver and install as a dependency.

make
sudo make install
sudo depmod

The output will look similar to the following:

~/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, everything worked fine and it showed up just fine.

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

[amazon_link asins=’B01B5WFX6C,B00APNRSFC,B00KJX441E,B00ZPL59LO,B01HDSN4EA’ template=’ProductCarousel’ store=’openmindspace-20′ marketplace=’US’ link_id=’df50684c-d2ae-11e6-995a-5b67a75b2844′]


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

  1. Brilliant! I’ve been trying for about a month to get the sd card working. After doing this I just made it swap with parted, edited fstab and turned swapon.
    Thank you.

Leave a Reply

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