Ubuntu 14.04 Realtek Semiconductor Co.,Ltd。RTS5227 PCI Express读卡器无法正常工作

我已经阅读了其他一些发布此问题的post。 但是没有针对这个问题的解决方案。 我在联想T440上安装了Ubuntu 14.04。

Realtek半导体有限公司RTS5227 PCI Express读卡器尚未开发。

我把SD卡推入插槽后,什么也没发生。

# lspci 02:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5227 PCI Express Card Reader (rev 01) Subsystem: Lenovo Device 220c Flags: fast devsel, IRQ 16 Memory at f0500000 (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 Capabilities: [100] Advanced Error Reporting Capabilities: [140] Device Serial Number 00-00-00-01-00-4c-e0-00 Capabilities: [150] Latency Tolerance Reporting Capabilities: [158] L1 PM Substates # lshw *-pci:0 Beschreibung: PCI bridge Produkt: Lynx Point-LP PCI Express Root Port 6 Hersteller: Intel Corporation Physische ID: 1c Bus-Informationen: pci@0000:00:1c.0 Version: e4 Breite: 32 bits Takt: 33MHz Fähigkeiten: pci pciexpress msi pm normal_decode bus_master cap_list Konfiguration: driver=pcieport Ressourcen: irq:17 memory:f0500000-f05fffff *-generic UNGEFORDERT Beschreibung: Unassigned class Produkt: RTS5227 PCI Express Card Reader Hersteller: Realtek Semiconductor Co., Ltd. Physische ID: 0 Bus-Informationen: pci@0000:02:00.0 Version: 01 Breite: 32 bits Takt: 33MHz Fähigkeiten: pm msi pciexpress cap_list Konfiguration: latency=0 Ressourcen: memory:f0500000-f0500fff 

格尔茨

在MSI GE60工作我有一个Realtek半导体有限公司RTS5227在Windows上工作但不在linux mint(基于ubuntu)。

注意/重要事项:

使用此方法可能会导致设备在重启后无法识别读卡器。 我还不明白发生了什么,但设备似乎无法在pci总线上进行枚举。 我通过冷启动修复了Windows(官方驱动程序)。

我找到了一些rts5209的教程,并尝试调整它们:

https://vidyut.net/realtek-sd-card-reader-working-ubuntu/

http://dainaccio.wordpress.com/2013/07/14/realtek-sd-reader-mounting-problems-under-linux-mintubuntu/#more-836

我从realtek网站(用于Linux的PCIE RTS5229读卡器驱动程序)获取RTS5229的来源:在我的消息中不超过2个链接,教程似乎更重要 – >谷歌

然后我做了比rtcx.c中的链接教程更多的代码修改,以便构建没有错误:在rtsx_host_template初始化行206中注释proc_info的声明。

 (before) .proc_info = proc_info, (after) //.proc_info = proc_info, 

一旦我完成了这个,我就构建了驱动程序并尝试使用它,但显然驱动程序和硬件之间的链接并不存在。

所以我拿了我的设备名称并尝试修改代码以获得正确的设备名称。 进入rtsx.h的第一行(55)并根据需要调整设备名称的定义:

 (before) #define CR_DRIVER_NAME "rts5229" (after) #define CR_DRIVER_NAME "rts5227" 

之后我修改了Makefile的目标:

 (before) TARGET_MODULE := rts5229 (after) TARGET_MODULE := rts5227 

什么之后

 make clean make sudo make install sudo depmod sudo modprobe rts5227 

validation您的设备是否使用rtsx_pci模块(lspci -v),如果需要使用Dainaccio方法来修复它(接近第二个教程的末尾)。

当您的模块正确加载时,ls / dev应该显示一个新接口(对于我/ dev / sdb):D

事实上,这并不是很干净。事情是,应该更多地了解2读卡器版本之间的差异,以及对驱动程序的更多理解,以使其工作正常。

驱动程序基本上是可用的,您可以在卡上安装/卸载分区,写入和读取,检测插入和删除。 我还没有测试过automount。 但无论如何,驱动程序工作的lspci -v将向您显示此解决方案不干净:外设类无法识别,因此我认为其他值。 通过简单的代码查看我也看到很多参考硬编码到rts5229。 他们可能有些工作要做……

无论如何,祝你有愉快的一天!

~~~~~

上游rtsx_pci管理读卡器。

还是有问题,因为我必须卸载然后重新加载驱动程序才能工作:

 # modprobe -r rtsx_pci # modprobe rtsx_pci 

PS:我还没有向上游报告(甚至已经报告过已经报道的问题)。 我希望尽快做到这一点虽然随意打败我(onyl要求是有硬件重现这个bug)。

这里有Thinkpad Yoga S1,它也提供此设备:

 # lspci 05:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5227 PCI Express Card Reader (rev 01) Subsystem: Lenovo Device 2217 Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+ Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR-  

它是我的Debian系统上的rts_pstor驱动程序。 花了两个rmmod / modprobe循环让它工作。

我已经尝试过上述解决方案,但它对我的联想T540p和Linux Mint Mate 14.04 LTS无效。 我研究了内核源代码(标题)并没有找到任何解决方案。 所以我从http://www.kernel.org下载了稳定内核19.1,并在/usr/src/linux_19.1/drivers/mfd/找到了一个名为rts5227.c的文件。 从内核版本3.9及更高版本开始,可以找到此文件。

我决定编译新的内核,包括。 原来的.config使用

 make oldconfig make menuconfig 

然后,在保存当前配置并编译内核和模块后,我离开了menuconfig

 make 

要安装模块:

 sudo make modules_install 

安装新内核并更新Grub2

 sudo make install 

当一切准备就绪后,重新启动系统(我不得不重启两次,’因为第一次重启最终在initramfs的shell中(没有找到“dev by uuid”))

现在您应该看到SD卡插入SD插槽。 我在PCIe插槽中有一个PCIe USB 3.0卡,它现在正在工作。

您可以尝试以下代码在启动时启用rtsx_pci模块。

 echo "rtsx_pci" | sudo tee -a /etc/modules