I have a RTS5209 Realtek SD card reader on my laptop, which was not reading any card inserted. The following instructions are likely to work for other versions like RTS5229 or RTS5289 as well.
Turns out I needed to install the driver.
Realtek offers drivers on its website for Ubuntu/Linux. Download the driver and unpack into a temporary directory.
Open a terminal and cd into the directory you unpacked the file.
Then enter one after the other:
sudo make install
You will have to reboot your computer for the driver to load, or you can enter this command:
sudo modprobe rts_pstor
This is for RTS5209. I believe for RTS5229 it is (hint:read folder name):
sudo modprobe rts5229
However, this only works on older kernels and on 3.9+ you get errors like:
sed "s/RTSX_MK_TIME/`date +%y.%m.%d.%H.%M`/" timestamp.in > timestamp.h
cp -f ./define.release ./define.h
make -C /lib/modules/3.8.0-26-generic/build/ SUBDIRS=/home/vidyut/tmp/rts_pstor modules
make: Entering directory `/usr/src/linux-headers-3.8.0-26-generic'
CC [M] /home/vidyut/tmp/rts_pstor/rtsx.o
/home/vidyut/tmp/rts_pstor/rtsx.c:916:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘rtsx_probe’
/home/vidyut/tmp/rts_pstor/rtsx.c:1080:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘rtsx_remove’
/home/vidyut/tmp/rts_pstor/rtsx.c:1106:11: error: ‘rtsx_probe’ undeclared here (not in a function)
/home/vidyut/tmp/rts_pstor/rtsx.c:1107:2: error: implicit declaration of function ‘__devexit_p’ [-Werror=implicit-function-declaration]
/home/vidyut/tmp/rts_pstor/rtsx.c:1107:24: error: ‘rtsx_remove’ undeclared here (not in a function)
/home/vidyut/tmp/rts_pstor/rtsx.c:485:12: warning: ‘rtsx_control_thread’ defined but not used [-Wunused-function]
/home/vidyut/tmp/rts_pstor/rtsx.c:596:12: warning: ‘rtsx_polling_thread’ defined but not used [-Wunused-function]
/home/vidyut/tmp/rts_pstor/rtsx.c:745:13: warning: ‘quiesce_and_remove_host’ defined but not used [-Wunused-function]
/home/vidyut/tmp/rts_pstor/rtsx.c:780:13: warning: ‘release_everything’ defined but not used [-Wunused-function]
/home/vidyut/tmp/rts_pstor/rtsx.c:790:12: warning: ‘rtsx_scan_thread’ defined but not used [-Wunused-function]
/home/vidyut/tmp/rts_pstor/rtsx.c:816:13: warning: ‘rtsx_init_options’ defined but not used [-Wunused-function]
cc1: some warnings being treated as errors
make: *** [/home/vidyut/tmp/rts_pstor/rtsx.o] Error 1
make: *** [_module_/home/vidyut/tmp/rts_pstor] Error 2
make: Leaving directory `/usr/src/linux-headers-3.8.0-26-generic'
make: *** [default] Error 2
The fix for this is to edit the file rtsx.c (that is throwing the errors) and remove “__devinit” “__devexit” and “__devexit_p” from it, leaving the rest of the code (and the rest of the line they occur in) in tact.
__devinit rtsx_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
static int rtsx_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
__devexit rtsx_remove(struct pci_dev *pci)
static void rtsx_remove(struct pci_dev *pci)
.remove = rtsx_remove,
Now, when you run make, the process should complete without errors.
If your SD card *still* doesn’t mount, check your dmesg like so:
If it shows something like:
[ 694.058432] systemd-hostnamed: Warning: nss-myhostname is not installed. Changing the local hostname might make it unresolveable. Please install nss-myhostname!
Try installing the library.
apt-get install libnss-myhostname
If it still doesn’t work, I don’t know what to do. This SHOULD work.