Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SD card reader in HP ProBook 450s G0
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
nilreM
n00b
n00b


Joined: 22 Nov 2007
Posts: 19
Location: Voronezh

PostPosted: Sat Mar 01, 2014 10:46 am    Post subject: SD card reader in HP ProBook 450s G0 Reply with quote

Hello, guys.

I'm configuring Gentoo on my new HP ProBook 450s G0. Among other features, it has internal SD/MMC card reader, which lists in lspci as "Realtek Semiconductor Co., Ltd. RTS5229 PCI Express Card Reader (rev 01)".

If I boot machine with SD card installed, card reader is listed and works as expected. Installing and removing the card causes messages in the dmesg, also udisks shows notifications etc.. The corresponding lspci output is:

Code:
00:00.0 Host bridge: Intel Corporation 3rd Gen Core processor DRAM Controller (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)
00:16.0 Communication controller: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 (rev c4)
00:1c.2 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 3 (rev c4)
00:1c.3 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 4 (rev c4)
00:1c.5 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 6 (rev c4)
00:1d.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation HM76 Express Chipset LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 7 Series Chipset Family 6-port SATA Controller [AHCI mode] (rev 04)
02:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5229 PCI Express Card Reader (rev 01)
03:00.0 Network controller: Ralink corp. RT3290 Wireless 802.11n 1T/1R PCIe
03:00.1 Bluetooth: Ralink corp. RT3290 Bluetooth
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)

In dmesg were some related messages::
Code:
[    1.671078] pci 0000:02:00.0: [10ec:5229] type 00 class 0xff0000
[    1.671103] pci 0000:02:00.0: reg 10: [mem 0xd0700000-0xd0700fff]
[    1.671272] pci 0000:02:00.0: supports D1 D2
[    1.671273] pci 0000:02:00.0: PME# supported from D1 D2 D3hot
...
[    1.854614] pci 0000:02:00.0: Signaling PME through PCIe PME interrupt
...
[    3.101202] rtsx_pci 0000:02:00.0: irq 46 for MSI/MSI-X
[    3.101215] rtsx_pci 0000:02:00.0: rtsx_pci_acquire_irq: pcr->msi_en = 1, pci->irq = 46


So far, so good. But, if I boot machine without the card, the card reader is absent. lspci shows no line
Code:
02:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5229 PCI Express Card Reader (rev 01)

dmesg also doesn't contain anything about device 02:00.0. I can insert and remove cards, nothing happens in the system. No notifications, silence in dmesg.
Now, if I install card and do
Code:
echo "1" > /sys/bus/pci/rescan

the cardreader will appear immediatly, the card is detected and shows usual notifications. The lspci output looks now like above, dmesg shows these for the moment of rescan:
Code:
[  532.090303] pci 0000:02:00.0: [10ec:5229] type 00 class 0xff0000
[  532.090337] pci 0000:02:00.0: reg 10: [mem 0x00000000-0x00000fff]
[  532.090531] pci 0000:02:00.0: supports D1 D2
[  532.090533] pci 0000:02:00.0: PME# supported from D1 D2 D3hot
[  532.092283] pci 0000:02:00.0: BAR 0: assigned [mem 0xd0700000-0xd0700fff]
[  532.092349] rtsx_pci 0000:02:00.0: enabling device (0000 -> 0002)
[  532.092464] rtsx_pci 0000:02:00.0: irq 50 for MSI/MSI-X
[  532.092483] rtsx_pci 0000:02:00.0: rtsx_pci_acquire_irq: pcr->msi_en = 1, pci->irq = 50

(rtsx_pci is the card reader driver)

Now, the system works just like if I booted it with card in there. Even if I rescan pci bus without card, card reader wouldn't disappear.

I thought it might have something to do with PCI hotplug (which was disabled - the laptop has no expresscard slots, so no way to hotplug anything into PCI bus in runtime). I rebuilt the kernel, adding the support for hotplug (everything I expect to be needed for work):
Code:
CONFIG_HOTPLUG_PCI_PCIE=y
CONFIG_PCI_IOAPIC=y
CONFIG_HOTPLUG_PCI=y
CONFIG_HOTPLUG_PCI_ACPI=y

But this showed no differences.

What is going? I have a workaround, but it isn't convinient to always run some script as root when I first time insert a card. How do I get rid of this issue?

The kernel I use is lastest stable gentoo-sources-3.10.25 built with lastest stable genkernel-3.4.45.1
Back to top
View user's profile Send private message
sebB
l33t
l33t


Joined: 02 Mar 2011
Posts: 732
Location: S.O. France

PostPosted: Tue Mar 04, 2014 10:26 pm    Post subject: Reply with quote

According to this you need

Code:
CONFIG_MFD_RTSX_PCI=m
CONFIG_MMC_REALTEK_PCI=m
CONFIG_MEMSTICK_REALTEK_PCI=m
Back to top
View user's profile Send private message
nilreM
n00b
n00b


Joined: 22 Nov 2007
Posts: 19
Location: Voronezh

PostPosted: Wed Mar 05, 2014 3:41 pm    Post subject: Reply with quote

I have read that thread.

I have first two as "Y", compiled in-kernel. Memstick is N, because it is for Sony MemoryStick cards, and this laptop doesn't support them. Although, I tried to build everything (including memstick) as modules, with no difference.

I also tried to use sys-block/rts5229 instead of in-tree driver. This showed some unimportant differences (devices look like /dev/sdX instead of /dev/mmcblkX), but the general behaviour looked exactly like this: no device in lspci unless booted with card inserted or rescanned PCI bus with card inserted. No uevents or something when card is inserted in this case. But, when the device appeared in lspci (no matter was it booted with card in, or rescanned the bus afterwards), everything works: card insertion generates kernel events and udev reacts as expected.

From this I can deduce that all drivers it needs to work are built and working. I don't need to check device drivers.
It looks like system firmware disables card reader when it is unused to save energy. So, it might be a power management issue. What do I check about this, as if I am completely dumb in this matter?
Back to top
View user's profile Send private message
sebB
l33t
l33t


Joined: 02 Mar 2011
Posts: 732
Location: S.O. France

PostPosted: Wed Mar 05, 2014 5:48 pm    Post subject: Reply with quote

Quote:
I have first two as "Y"

Try compiling them as module (M)
Back to top
View user's profile Send private message
v_andal
Guru
Guru


Joined: 26 Aug 2008
Posts: 523
Location: Germany

PostPosted: Thu Mar 06, 2014 7:57 am    Post subject: Reply with quote

nilreM wrote:
I have read that thread.
From this I can deduce that all drivers it needs to work are built and working. I don't need to check device drivers.
It looks like system firmware disables card reader when it is unused to save energy.


There's option CONFIG_MMC_RICOH_MMC. I don't know if it would help, but maybe you should try. From my own experience, it's no so simple to get SD cards reader to work under Linux. I had to use driver for Memory Stick to get my SD Card reader working (also Ricoh controller).
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