# Card Reader RTL8411B

## bifi.ftw

Greetings everyone,

I'm trying to get my card reader running, however, there is no guide on the gentoo wiki so I tried it on my own.

lspci -vvnn

```
04:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTL8411B PCI Express Card Reader [10ec:5287] (rev 01)

   Subsystem: CLEVO/KAPOK Computer RTL8411B PCI Express Card Reader [1558:6504]

   Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+

   Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-

   Latency: 0, Cache Line Size: 64 bytes

   Interrupt: pin B routed to IRQ 30

   Region 0: Memory at f7c15000 (32-bit, non-prefetchable) [size=4K]

   Expansion ROM at f7c00000 [disabled] [size=64K]

   Capabilities: [40] Power Management version 3

      Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0-,D1+,D2+,D3hot+,D3cold+)

      Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-

   Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+

      Address: 00000000feeff00c  Data: 4162

   Capabilities: [70] Express (v2) Endpoint, MSI 00

      DevCap:   MaxPayload 128 bytes, PhantFunc 0, Latency L0s <512ns, L1 <64us

         ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset- SlotPowerLimit 10.000W

      DevCtl:   Report errors: Correctable- Non-Fatal- Fatal- Unsupported-

         RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-

         MaxPayload 128 bytes, MaxReadReq 512 bytes

      DevSta:   CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr+ TransPend-

      LnkCap:   Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s unlimited, L1 <64us

         ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp+

      LnkCtl:   ASPM L1 Enabled; RCB 64 bytes Disabled- CommClk+

         ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt-

      LnkSta:   Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-

      DevCap2: Completion Timeout: Range ABCD, TimeoutDis+, LTR+, OBFF Via message/WAKE#

      DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR+, OBFF Disabled

      LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-

          Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-

          Compliance De-emphasis: -6dB

      LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete-, EqualizationPhase1-

          EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-

   Capabilities: [b0] MSI-X: Enable- Count=1 Masked-

      Vector table: BAR=0 offset=00000000

      PBA: BAR=0 offset=00000000

   Capabilities: [d0] Vital Product Data
```

I enabled and loaded the kernel modules mmc_block, sdhci-pci and rtsx_pci.

dmesg after loading the modules:

https://paste.pound-python.org/show/ADQSpe2zGzKK1Sacl8C4/

"rtsx_pci 0000:04:00.0: VPD access failed.  This is likely a firmware bug on this device.  Contact the card vendor for a firmware update"

Any help or online resources are welcome.

Thank you for your time.

----------

## littletux

Have you installed  *Quote:*   

> sys-kernel/linux-firmware

 

----------

## bunder

What firmware do you need for that?  I never got mine working either it would seem.  Thanks

----------

## Jaglover

According to the kernel driver database [cateee.net] 10ec:5287 requires at least kernel 4.16. 

https://cateee.net/lkddb/web-lkddb/MISC_RTSX_PCI.html

----------

## bunder

I suspect that page is partially incorrect because rtsx_pci is also available in 4.14.44, however I just got the same message when running lspci or lshw after enabling it.

----------

## Jaglover

rtsx_pci may be available in earlier kernels, but the actual PCI ID is not supported.

----------

## littletux

@bifi.ftw

I suggest you are running gentoo stable, so you have installed a kernel  4.9.95 or older

so rtsx_pci is also avaiable in 4.9.95 (the latest kernel masked as stable in gentoo for) but if this is true what Jaglover says then you must use a kernel from gentoo testing

so now I hope for you, you have no nvidia card in your PC, or your nvidia card uses nvidia-drivers-396.24-r1(the latest) because if not you can not doing both 

then you have to chose between the latest kernel for using your card reader, or to use the proprietary nvidia-drivers

----------

## bifi.ftw

Thank you for the number of responses.

Yes, I have linux-firmware installed and I am running the lates stable kernel (4.9.95).

Did I understand you correctly that the latest stable kernel does not support my card reader?

I'm not even sure which drivers I need to activate in the kernel, was my selection correct?

----------

## littletux

Not sure but I think your selection is correct, but your kernel does not support the Chip with this ID. So you have to unlock the testing kernel

add this to /etc/portage/package.keywords/package.keywords

```
sys-kernel/gentoo-sources
```

after this do a 

```
emerge -uDN world
```

build the new kernel and hope this solves your problem

----------

## bunder

I got my reader working, in addition to needing rtsx_pci, you also need MMC_REALTEK_PCI.

----------

