Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
sd card reader is Not found
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
royalts
n00b
n00b


Joined: 06 Jan 2015
Posts: 39

PostPosted: Sun Jan 10, 2016 12:15 am    Post subject: sd card reader is Not found Reply with quote

Hey,


I know this topic was discussed many times before but I can't find a solution for me.
I updated fro kernel 3.6.11 to 4.1.12. Now pretty much everything works fine, but my integrated SD/MMC card reader.


Quote:

lspci:

04:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5209 PCI Express Card Reader (rev 01)
Subsystem: Acer Incorporated [ALI] RTS5209 PCI Express Card Reader
Flags: bus master, fast devsel, latency 0, IRQ 7
Memory at b0501000 (32-bit, non-prefetchable) [size=4K]
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [70] Express Endpoint, MSI 00

04:00.1 SD Host controller: Realtek Semiconductor Co., Ltd. RTS5209 PCI Express Card Reader (rev 01)
Subsystem: Realtek Semiconductor Co., Ltd. RTS5209 PCI Express Card Reader
Flags: bus master, fast devsel, latency 0, IRQ 19
Memory at b0500000 (32-bit, non-prefetchable) [size=256]
Capabilities: [80] Power Management version 3
Capabilities: [90] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [b0] Express Endpoint, MSI 01
Kernel driver in use: sdhci-pci
Kernel modules: sdhci_pci



So it seems my SD card reader will work. But when I insert a SD card, which I was able to read/write on my old kernel, I didn't get a new device in /dev and dmesg didn't output anything.

I tick on every single entry in my kernel config.

Quote:


│ │ --- MMC/SD/SDIO card support │ │
│ │ [*] MMC debugging │ │
│ │ [*] MMC host clock gating │ │
│ │ *** MMC/SD/SDIO Card Drivers *** │ │
│ │ <M> MMC block device driver │ │
│ │ (8) Number of minors per block device │ │
│ │ [*] Use bounce buffer for simple hosts │ │
│ │ <M> SDIO UART/GPS class support │ │
│ │ <M> MMC host test driver │ │
│ │ *** MMC/SD/SDIO Host Controller Drivers *** │ │
│ │ <M> Secure Digital Host Controller Interface support │ │
│ │ <M> SDHCI support on PCI bus │ │
│ │ [*] Ricoh MMC Controller Disabler │ │
│ │ <M> SDHCI support for ACPI enumerated SDHCI controllers │ │
│ │ <M> SDHCI platform and OF driver helper │ │
│ │ <M> Winbond W83L51xD SD/MMC Card Interface support │ │
│ │ <M> TI Flash Media MMC/SD Interface support │ │
│ │ <M> MMC/SD driver for Ricoh Bay1Controllers │ │
│ │ <M> ENE CB710 MMC/SD Interface support │ │
│ │ <M> VIA SD/MMC Card Reader Driver │ │
│ │ <M> VUB300 USB to SDIO/SD/MMC Host Controller support │ │
│ │ <M> USB SD Host Controller (USHC) support │ │
│ │ <M> Renesas USDHI6ROL0 SD/SDIO Host Controller support │ │
│ │ <M> Toshiba Type A SD/MMC Card Interface Driver │ │



But this was not successful. select everything as built in end up the same :(

I found something like: CONFIG_SCSI_MULTI_LUN=y in prior post but can't find a similar menu entry in my 4.1.12 kernel.
Thanks 4 your effort
Back to top
View user's profile Send private message
vose
n00b
n00b


Joined: 28 Feb 2007
Posts: 33

PostPosted: Sun Jan 10, 2016 3:11 am    Post subject: Reply with quote

I don't have a clue, but perhaps something about the following might lead to one...

http://unix.stackexchange.com/questions/134579/realtek-rts5209-pci-e-card-reader-only-work-if-card-is-inserted-before-boot
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1655
Location: United Kingdom

PostPosted: Sun Jan 10, 2016 4:27 am    Post subject: Reply with quote

My main laptop also has a Realtek controller for the memory card slot, albeit not a 5209. I had to make some changes in order to get it working. I'm not using a 4.* kernel yet, but perhaps the following description of what I did might be of some help to you:

https://fitzcarraldoblog.wordpress.com/2015/04/28/realtek-5287-pcie-controller-for-memory-card-reader/
_________________
Clevo W230SS: amd64 OpenRC elogind nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 OpenRC elogind xf86-video-ati. Dual boot Win 7 Pro 64-bit.
KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 2152
Location: Berlin, Germany

PostPosted: Sun Jan 10, 2016 11:08 am    Post subject: Reply with quote

I think what you need to enable for this card reader is CONFIG_MFD_RTSX_PCI.

CONFIG_SCSI_MULTI_LUN was necessary on older kernels for USB card readers.
Back to top
View user's profile Send private message
royalts
n00b
n00b


Joined: 06 Jan 2015
Posts: 39

PostPosted: Sun Jan 10, 2016 8:09 pm    Post subject: Reply with quote

hey guys!

I added some Hotplug modules like described here: https://fitzcarraldoblog.wordpress.com/2015/04/28/realtek-5287-pcie-controller-for-memory-card-reader/

Quote:

ronny-reiner-rambo linux # cat .config | grep -i hotplug
CONFIG_MEMORY_HOTPLUG=y
CONFIG_MEMORY_HOTPLUG_SPARSE=y
CONFIG_HOTPLUG_CPU=y
# CONFIG_BOOTPARAM_HOTPLUG_CPU0 is not set
# CONFIG_DEBUG_HOTPLUG_CPU0 is not set
CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
CONFIG_ACPI_HOTPLUG_CPU=y
CONFIG_ACPI_HOTPLUG_MEMORY=y
CONFIG_ACPI_HOTPLUG_IOAPIC=y
# CONFIG_HOTPLUG_PCI_PCIE is not set
CONFIG_HOTPLUG_PCI=y
CONFIG_HOTPLUG_PCI_ACPI=y
# CONFIG_HOTPLUG_PCI_ACPI_IBM is not set
CONFIG_HOTPLUG_PCI_CPCI=y
# CONFIG_HOTPLUG_PCI_CPCI_ZT5550 is not set
# CONFIG_HOTPLUG_PCI_CPCI_GENERIC is not set
CONFIG_HOTPLUG_PCI_SHPC=y



and built

Quote:

CONFIG_MFD_RTSX_PCI=m


as a module. lspci now looks like that:

Quote:

04:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5209 PCI Express Card Reader (rev 01)
Subsystem: Acer Incorporated [ALI] RTS5209 PCI Express Card Reader
Flags: bus master, fast devsel, latency 0, IRQ 26
Memory at b0501000 (32-bit, non-prefetchable) [size=4K]
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
Capabilities: [70] Express Endpoint, MSI 00
Kernel driver in use: rtsx_pci
Kernel modules: rtsx_pci

04:00.1 SD Host controller: Realtek Semiconductor Co., Ltd. RTS5209 PCI Express Card Reader (rev 01)
Subsystem: Realtek Semiconductor Co., Ltd. RTS5209 PCI Express Card Reader
Flags: bus master, fast devsel, latency 0, IRQ 19
Memory at b0500000 (32-bit, non-prefetchable) [size=256]
Capabilities: [80] Power Management version 3
Capabilities: [90] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [b0] Express Endpoint, MSI 01
Kernel driver in use: sdhci-pci
Kernel modules: sdhci_pci


But it's still shown as: "Unassigned class [ff00]" and I got no device-folder in /dev. Thunar didn't recognize the reader either and dmesg did not throw any event.


Last edited by royalts on Sun Jan 10, 2016 8:26 pm; edited 1 time in total
Back to top
View user's profile Send private message
royalts
n00b
n00b


Joined: 06 Jan 2015
Posts: 39

PostPosted: Sun Jan 10, 2016 8:10 pm    Post subject: Reply with quote

I'm not sure but do I need ACPI software to get it working?
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 2152
Location: Berlin, Germany

PostPosted: Sun Jan 10, 2016 10:16 pm    Post subject: Reply with quote

The "unassigned class" is not a problem of the kernel or driver, it is just that lspci has no database entry for it.

Do you get anything new in dmesg when you plug in a card?
If nothing happens: I am not sure whether the rtsx_pci driver should drive both devices, can you ensure that the rtsx_pci driver loads before the sdhci one at boot?
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1655
Location: United Kingdom

PostPosted: Mon Jan 11, 2016 4:45 am    Post subject: Reply with quote

You have CONFIG_HOTPLUG_PCI_PCIE=n:

Code:
# CONFIG_HOTPLUG_PCI_PCIE is not set

I have set it in my configuration:

Code:
clevow230ss fitzcarraldo # grep -i hotplug /usr/src/linux/.config
# CONFIG_MEMORY_HOTPLUG is not set
CONFIG_HOTPLUG_CPU=y
# CONFIG_BOOTPARAM_HOTPLUG_CPU0 is not set
# CONFIG_DEBUG_HOTPLUG_CPU0 is not set
CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
CONFIG_ACPI_HOTPLUG_CPU=y
CONFIG_HOTPLUG_PCI_PCIE=y
CONFIG_HOTPLUG_PCI=y
CONFIG_HOTPLUG_PCI_ACPI=y
# CONFIG_HOTPLUG_PCI_ACPI_IBM is not set
# CONFIG_HOTPLUG_PCI_CPCI is not set
# CONFIG_HOTPLUG_PCI_SHPC is not set
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"

Is the Realtek memory card controller a PCIE card in your machine? I believe my laptop has a PCIE card:

Code:
clevow230ss fitzcarraldo # lspci | grep -i realtek
04:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. Device 5287 (rev 01)
04:00.1 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 12)

_________________
Clevo W230SS: amd64 OpenRC elogind nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 OpenRC elogind xf86-video-ati. Dual boot Win 7 Pro 64-bit.
KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
royalts
n00b
n00b


Joined: 06 Jan 2015
Posts: 39

PostPosted: Mon Jan 11, 2016 1:14 pm    Post subject: Reply with quote

@chithanh: dmesg and udevadm monitor did't output anything. So how could I ensure rtsx_pci loads before sdhci?


@Fitzcarraldo: I added

Quote:

cat /usr/src/linux/.config | grep 'CONFIG_HOTPLUG_PCI_PCIE'
CONFIG_HOTPLUG_PCI_PCIE=y


but the problem still remains.
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1655
Location: United Kingdom

PostPosted: Mon Jan 11, 2016 3:15 pm    Post subject: Reply with quote

I have 'sdhci-pci' listed before 'rtsx_pci' in /etc/conf.d/modules:

Code:
clevow230ss fitzcarraldo # cat /etc/conf.d/modules
modules="r8169 nvidia agpgart fuse bnep rfcomm hidp uvcvideo cifs mmc_block sdhci-pci rtsx_pci snd-seq-midi vboxdrv vboxnetadp vboxnetflt"

but it appears that rtsx_pci loads earlier than sdhci:

Code:
clevow230ss fitzcarraldo # dmesg | grep rtsx
[    6.656558] rtsx_pci 0000:04:00.0: rtsx_pci_acquire_irq: pcr->msi_en = 0, pci->irq = 16
clevow230ss fitzcarraldo # dmesg | grep sdhci
[   10.643391] sdhci: Secure Digital Host Controller Interface driver
[   10.643393] sdhci: Copyright(c) Pierre Ossman

_________________
Clevo W230SS: amd64 OpenRC elogind nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 OpenRC elogind xf86-video-ati. Dual boot Win 7 Pro 64-bit.
KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
royalts
n00b
n00b


Joined: 06 Jan 2015
Posts: 39

PostPosted: Mon Jan 11, 2016 3:43 pm    Post subject: Reply with quote

ich put my PCI ID in here: http://kmuto.jp/debian/hcl/index.rhtmlx and i got as a result: Driver: rts_pstor.
This is in the package: sys-block/rts_pstor, but not available in the kernel config (which I don't understand :/ )
After install lspci -v lokks like that:

Quote:

04:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5209 PCI Express Card Reader (rev 01)
Subsystem: Acer Incorporated [ALI] RTS5209 PCI Express Card Reader
Flags: fast devsel, IRQ 18
Memory at b0501000 (32-bit, non-prefetchable) [size=4K]
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [70] Express Endpoint, MSI 00
Kernel modules: rtsx_pci, rts_pstor

04:00.1 SD Host controller: Realtek Semiconductor Co., Ltd. RTS5209 PCI Express Card Reader (rev 01)
Subsystem: Realtek Semiconductor Co., Ltd. RTS5209 PCI Express Card Reader
Flags: bus master, fast devsel, latency 0, IRQ 19
Memory at b0500000 (32-bit, non-prefetchable) [size=256]
Capabilities: [80] Power Management version 3
Capabilities: [90] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [b0] Express Endpoint, MSI 01
Kernel driver in use: sdhci-pci
Kernel modules: sdhci_pci



and dmesg:

Quote:

[ 9130.548105] rts_pstor: module verification failed: signature and/or required key missing - tainting kernel
[ 9130.549504] Initializing Realtek PCIE storage driver...


By the way: I found this in dmesg, too (appears very often)

Quote:

sdhci: =========== REGISTER DUMP (mmc0)===========
[ 1130.989656] sdhci: Sys addr: 0x00000000 | Version: 0x00000000
[ 1130.989665] sdhci: Blk size: 0x00000000 | Blk cnt: 0x00000000
[ 1130.989672] sdhci: Argument: 0x00000000 | Trn mode: 0x00000000
[ 1130.989680] sdhci: Present: 0x00080000 | Host ctl: 0x00000000
[ 1130.989687] sdhci: Power: 0x00000000 | Blk gap: 0x00000000
[ 1130.989694] sdhci: Wake-up: 0x00000000 | Clock: 0x00000000
[ 1130.989702] sdhci: Timeout: 0x00000000 | Int stat: 0x00000000
[ 1130.989710] sdhci: Int enab: 0x00ff0003 | Sig enab: 0x00ff0003
[ 1130.989716] sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000
[ 1130.989724] sdhci: Caps: 0x03e820a0 | Caps_1: 0x00000000
[ 1130.989731] sdhci: Cmd: 0x00000000 | Max curr: 0x00008880
[ 1130.989737] sdhci: Host ctl2: 0x00000000
[ 1130.989739] sdhci: ===========================================
[ 1130.989922] mmc0: clock 0Hz busmode 2 powermode 0 cs 0 Vdd 0 width 0 timing 0
[ 1130.989934] sdhci-pci 0000:04:00.1: Will use DMA mode even though HW doesn't fully claim to support it.
[ 1130.991288] mmc0: frequency set to 0 in disable function, this means the clock is already disabled.
[ 1130.991305] mmc0: SDHCI controller on PCI [0000:04:00.1] using DMA
[ 1134.728947] sdhci-pci 0000:04:00.1: Will use DMA mode even though HW doesn't fully claim to support it.
[ 1180.151359] sdhci: Secure Digital Host Controller Interface driver
[ 1180.151369] sdhci: Copyright(c) Pierre Ossman
[ 1180.157592] sdhci-pci 0000:04:00.1: SDHCI controller found [10ec:5209] (rev 1)
[ 1180.157603] sdhci-pci 0000:04:00.1: found 1 slot(s)
[ 1180.157751] sdhci-pci 0000:04:00.1: Will use DMA mode even though HW doesn't fully claim to support it.
[ 1180.157764] sdhci [sdhci_add_host()]: mmc0: Auto-CMD23 unavailable
[ 1180.157770] sdhci-pci 0000:04:00.1: No vmmc regulator found
[ 1180.157773] sdhci-pci 0000:04:00.1: No vqmmc regulator found
[ 1180.157781] sdhci-pci 0000:04:00.1: Will use DMA mode even though HW doesn't fully claim to support it.

Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1655
Location: United Kingdom

PostPosted: Mon Jan 11, 2016 4:09 pm    Post subject: Reply with quote

What happens if you merge sys-block/rts_pstor and then rmmod rts_pstor && modprobe rts_pstor?
_________________
Clevo W230SS: amd64 OpenRC elogind nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 OpenRC elogind xf86-video-ati. Dual boot Win 7 Pro 64-bit.
KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
royalts
n00b
n00b


Joined: 06 Jan 2015
Posts: 39

PostPosted: Mon Jan 11, 2016 4:21 pm    Post subject: Reply with quote

That's It! rmmod rts_pstor && modprobe rts_pstor did it :D
So could I remove sdhci_pci,... or is this still needed and why are bot listed in my lspci -v (see post above)? Could a deive load/need two kernel modules?
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1655
Location: United Kingdom

PostPosted: Mon Jan 11, 2016 4:50 pm    Post subject: Reply with quote

Try rmmod sdhci_pci and, if your card reader continues working, you'll know you don't need it as well.


EDIT: BTW, it looks like the rts_pstor driver was removed from 4.* kernels and presumably the rtsx_pci is intended to take its place:

CONFIG_RTS_PSTOR "found in Linux kernels: 2.6.39, 3.0–3.7"

CONFIG_MFD_RTSX_PCI "found in Linux kernels: 3.10–3.19, 4.0–4.2, 4.4"

CONFIG_MMC_SDHCI_PCI "found in Linux kernels: 2.6.27–2.6.39, 3.0–3.19, 4.0–4.2, 4.4"
_________________
Clevo W230SS: amd64 OpenRC elogind nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 OpenRC elogind xf86-video-ati. Dual boot Win 7 Pro 64-bit.
KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum