# [SOLVED] card reader doesn't work - RTL8411 - rts_bpp

## Xywa

Hi 

I have a laptop with integrated card reader - which doesn't work. Last 2 lines of lspci show this (full listineg at the end):

```
 06:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. Device 5289 (rev 01) 

 06:00.2 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 0a)
```

so after Googleind I realized that ptobabbly this device (Realtek Semiconductor Co., Ltd. Device 5289 (rev 01)) is my card reader.

 *Quote:*   

> RTL8411
> 
> PCI Express 10/100/1000M Ethernet Controller with Integrated 1-LUN Card Reader Controller

 

http://www.realtek.com.tw/products/productsView.aspx?Langid=1&PNid=13&PFid=5&Level=5&Conn=4&ProdID=311

In Gentoo archive I have discovered that this piece of hardware is suported by net-misc/r8168

```
[b]Official Realtek r8168 linux driver.[/b] The following cards are currently supported: 

 RTL8111B RTL8168B RTL8111 RTL8168 RTL8111C RTL8111CP RTL8111D(L) RTL8168C 

 RTL8111DP RTL8111E RTL8168E RTL8111F [b]RTL8411[/b]
```

Full info:

http://archives.gentoo.org/gentoo-commits/msg_c803dda7ff8af6592b9a76decbf0dedc.xml

I had to remove R8169 module for my ethernet card (which used to work fine) and install a new one r8168. My ethernet card works pretty well with a new module, but my card reader still doesn't work

There is a kernel module rts_pstor to support RealTek PCI-E Card Reader, but only with those devices bellow eg. 5288 and my is 5289:

 *Quote:*   

> RealTek PCI-E Card Reader supportvendor: 10ec ("Realtek Semiconductor Co., Ltd."), device: 5208, class: ff ("Unassigned class")
> 
> vendor: 10ec ("Realtek Semiconductor Co., Ltd."), device: 5209 ("RTS5209 PCI Express Card Reader"), class: ff ("Unassigned class")
> 
> vendor: 10ec ("Realtek Semiconductor Co., Ltd."), device: 5288 ("Barossa PCI Express Card Reader"), class: ff ("Unassigned class")

 

but fortunatley, I have found that there is a new Realtek Card Reader driver called rts_bpp Realtek Card Reader RTL8411 Device 5289 (PCI 03:00.0) which look is what I am looking for. 

http://markmail.org/message/dz257ria4xkr2wm2#query:+page:1+mid:goquklty4zh6dx55+state:results

The problem is, I have no idea where to find version of this driver for Gentoo (is not yet in kernel)? Or how to install this driver for Ubuntu info Gentoo system?

```
# lspci 

 00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09) 

 00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09) 

 00:01.1 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09) 

 00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) 

 00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04) 

 00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 05) 

 00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 05) 

 00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b5) 

 00:1c.1 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 (rev b5) 

 00:1c.2 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 3 (rev b5) 

 00:1c.3 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 4 (rev b5) 

 00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05) 

 00:1f.0 ISA bridge: Intel Corporation HM65 Express Chipset Family LPC Controller (rev 05) 

 00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller (rev 05) 

 00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 05) 

 01:00.0 VGA compatible controller: NVIDIA Corporation Device 0de9 (rev ff) 

 04:00.0 USB controller: Texas Instruments Device 8241 (rev 02) 

 05:00.0 Network controller: Intel Corporation Centrino Wireless-N 130 (rev 34) 

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

 06:00.2 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 0a)
```

Last edited by Xywa on Tue May 08, 2012 7:59 pm; edited 1 time in total

----------

## roarinelk

download and unpack the rts_bpp archive,

cd into it, type "make" and as root "make install" (need to have configured kernel sources)

finally "modprobe rts_bpp".

works for me (module loads, but I don't have the device)

```

wget https://bugs.launchpad.net/bugs/971876/+attachment/2991730/+files/rts_bpp.tar.bz2

tar jxf rts_bpp.tar.bz2

cd rts_bpp

make

su -c 'make install ; modprobe rts_bpp ; depmod -a'

```

Last edited by roarinelk on Sun May 13, 2012 7:35 am; edited 1 time in total

----------

## Xywa

 *roarinelk wrote:*   

> download and unpack the rts_bpp archive,
> 
> cd into it, type "make" and as root "make install" (need to have configured kernel sources)
> 
> finally "modprobe rts_bpp".

 

I was thinking about this option, but in the future (eg. if this driver will be in portage or in kernel) - it will be possible to uninstall this one (made by make install)?

----------

## Gusar

Just unpack the .deb (ar x rts-bpp-dkms_1.1_all.deb; tar xf data.tar.gz), go into usr/src/rts_bpp-1.1/src and follow the README.txt. It compiled here, but obviously I can't test it as I don't have the hardware.

This driver is just as awful as rts_pstor and rts5139 though. It may work, but it duplicates tons of code instead of using the existing in-kernel mmc stack. A proper driver would be a fraction of the size of these realtek provided ones. They learned how to write proper wireless drivers, now someone will need to teach them how to write card reader drivers.

Edit: Doh, a solution was already provided as I was writing this. Anyway, uninstalling this driver is as simple as deleting the module from /lib/modules and running depmod -aLast edited by Gusar on Tue May 08, 2012 12:18 pm; edited 1 time in total

----------

## roarinelk

it's one file installed to /lib/module/<kernelversion>/...

whether it is in portage or not really doesn't matter :)

If it gets into the kernel (unlikely in its current state) then you don't need to build it

(you have to rebuild it for every new kernel you install currently).

----------

## Xywa

Many THX Gusar & roarinelk!

I would like to confirm this driver rts_bpp works fine and finally I have got working card reader!

[SOLVED]

----------

## Xywa

Everything was fine until Today's new kernel 3.3.5 (previous 3.3.4).

 :Twisted Evil:   :Twisted Evil:   :Twisted Evil:   :Twisted Evil: 

I had to make again

make - OK

make install- OK

modprobe - FATAL: Module rts_bpp not found - but as you can see there is a module  rts_bpp in  /lib/modules/3.3.5-gentoo/kernel/drivers/scsi 

 :Evil or Very Mad:   :Twisted Evil:   :Evil or Very Mad: 

Should I go back to 3.3.4? Or there is any bug in 3.3.5?

```
# make

cp -f ./define.release ./define.h

make -C /lib/modules/3.3.5-gentoo/build/ SUBDIRS=/root/rts_bpp modules

make[1]: Entering directory `/usr/src/linux-3.3.5-gentoo'

  CC [M]  /root/rts_bpp/rtsx.o

  CC [M]  /root/rts_bpp/rtsx_chip.o

  CC [M]  /root/rts_bpp/rtsx_transport.o

  CC [M]  /root/rts_bpp/rtsx_scsi.o

  CC [M]  /root/rts_bpp/rtsx_card.o

  CC [M]  /root/rts_bpp/general.o

  CC [M]  /root/rts_bpp/sd.o

  CC [M]  /root/rts_bpp/xd.o

  CC [M]  /root/rts_bpp/ms.o

  LD [M]  /root/rts_bpp/rts_bpp.o

  Building modules, stage 2.

  MODPOST 1 modules

  CC      /root/rts_bpp/rts_bpp.mod.o

  LD [M]  /root/rts_bpp/rts_bpp.ko

make[1]: Leaving directory `/usr/src/linux-3.3.5-gentoo'

```

```
# make install

cp rts_bpp.ko /lib/modules/3.3.5-gentoo/kernel/drivers/scsi -f

```

```
# modprobe rts_bpp

FATAL: Module rts_bpp not found.

```

```
# ls -la /lib/modules/3.3.5-gentoo/kernel/drivers/scsi/

total 456

drwxr-xr-x 2 root root   4096 May 12 06:29 .

drwxr-xr-x 6 root root   4096 May 12 06:25 ..

-rw-r--r-- 1 root root 451422 May 12 06:43 rts_bpp.ko

-rw-r--r-- 1 root root   3049 May 12 06:25 scsi_wait_scan.ko

```

----------

## Xywa

Ok, few reboots solved the problem...

----------

## Gusar

Reboots only solved it by chance. The actual solution you were missing is to run depmod -a. This registers new modules (or removes registration of modules you've deleted).

----------

## Xywa

 *Gusar wrote:*   

> Reboots only solved it by chance. The actual solution you were missing is to run depmod -a. This registers new modules (or removes registration of modules you've deleted).

 

You are my guru now   :Cool:  I am 100% sure I was trying everything with depmod - so probably I used  depmod -a by chance so it solved my problem not reboot, but for the future I will know this. MANY THANKS!

----------

## Rion

I've added ebuild into my overlay

layman -a rion

----------

## Xywa

I do not know what is wrong, but rts_bpp is NOT working with kernel 3.6.0 and 3.6.1  :Sad: 

Last one which did work is linux-3.5.4-gentoo.

Any idea where to report it?

----------

## Jamicon

 *Xywa wrote:*   

> I do not know what is wrong, but rts_bpp is NOT working with kernel 3.6.0 and 3.6.1 
> 
> Last one which did work is linux-3.5.4-gentoo.
> 
> Any idea where to report it?

 

Try compile kernel module Device Drivers->Staging Drivers->Realtec PCI-E Card Reader support. Module name is rts_pstor.

----------

## Xywa

 *Jamicon wrote:*   

>  *Xywa wrote:*   I do not know what is wrong, but rts_bpp is NOT working with kernel 3.6.0 and 3.6.1 
> 
> Last one which did work is linux-3.5.4-gentoo.
> 
> Any idea where to report it? 
> ...

 

rts_pstor doesn't work with my hardware, only rts_bpp

----------

