我在 ThinkPad E470 上安装了 Arch Linux,但遇到了一些 SD 卡读卡器问题。
我可以从卡上读取和写入,但是当我使用该卡时,会出现一些随机滞后,并且计算机会冻结一两秒。
目前谷歌没有提供帮助。这是内核每隔几分钟就会说的话。该卡在我的其他(旧)机器上工作正常,没有任何问题。
[ 3819.841392] mmc0: card 59b4 removed
[ 3820.984122] mmc0: Tuning timeout, falling back to fixed sampling clock
[ 3820.984290] mmc0: new ultra high speed SDR104 SDXC card at address 59b4
[ 3820.984418] mmcblk0: mmc0:59b4 SD000 120 GiB
[ 3831.241070] mmc0: Timeout waiting for hardware interrupt.
[ 3831.241075] mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
[ 3831.241080] mmc0: sdhci: Sys addr: 0x00000008 | Version: 0x00000603
[ 3831.241084] mmc0: sdhci: Blk size: 0x00007200 | Blk cnt: 0x00000008
[ 3831.241089] mmc0: sdhci: Argument: 0x00000000 | Trn mode: 0x0000003b
[ 3831.241093] mmc0: sdhci: Present: 0x01ff0000 | Host ctl: 0x00000017
[ 3831.241098] mmc0: sdhci: Power: 0x0000000f | Blk gap: 0x00000000
[ 3831.241102] mmc0: sdhci: Wake-up: 0x00000000 | Clock: 0x00000007
[ 3831.241107] mmc0: sdhci: Timeout: 0x0000000a | Int stat: 0x00000000
[ 3831.241111] mmc0: sdhci: Int enab: 0x02ff008b | Sig enab: 0x02ff008b
[ 3831.241115] mmc0: sdhci: AC12 err: 0x00000004 | Slot int: 0x00000000
[ 3831.241120] mmc0: sdhci: Caps: 0x25f8c8bf | Caps_1: 0x00002077
[ 3831.241124] mmc0: sdhci: Cmd: 0x0000123a | Max curr: 0x005800c8
[ 3831.241129] mmc0: sdhci: Resp[0]: 0x00000000 | Resp[1]: 0x00000000
[ 3831.241133] mmc0: sdhci: Resp[2]: 0x00000000 | Resp[3]: 0x00000800
[ 3831.241136] mmc0: sdhci: Host ctl2: 0x0000800b
[ 3831.241140] mmc0: sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x37400208
[ 3831.241141] mmc0: sdhci: ============================================
[ 3831.241744] mmcblk0: error -84 sending status command, retrying
[ 3831.292067] mmc0: Tuning timeout, falling back to fixed sampling clock
[ 3831.292287] mmcblk0: error -84 sending status command, retrying
[ 3831.343034] mmc0: Tuning timeout, falling back to fixed sampling clock
[ 3831.343229] mmcblk0: error -110 sending stop command, original cmd response 0x0, card status 0x900
[ 3831.343231] mmcblk0: error -110 transferring data, sector 0, nr 8, cmd response 0x0, card status 0x0
[ 3831.917030] mmc0: Tuning timeout, falling back to fixed sampling clock
[ 3841.992991] mmc0: Timeout waiting for hardware interrupt.
[ 3841.992994] mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
[ 3841.992999] mmc0: sdhci: Sys addr: 0x00000008 | Version: 0x00000603
[ 3841.993004] mmc0: sdhci: Blk size: 0x00007200 | Blk cnt: 0x00000008
[ 3841.993008] mmc0: sdhci: Argument: 0x00000000 | Trn mode: 0x0000003b
[ 3841.993013] mmc0: sdhci: Present: 0x01ff0000 | Host ctl: 0x00000017
[ 3841.993017] mmc0: sdhci: Power: 0x0000000f | Blk gap: 0x00000000
[ 3841.993021] mmc0: sdhci: Wake-up: 0x00000000 | Clock: 0x00000007
[ 3841.993026] mmc0: sdhci: Timeout: 0x0000000a | Int stat: 0x00000000
[ 3841.993030] mmc0: sdhci: Int enab: 0x02ff008b | Sig enab: 0x02ff008b
[ 3841.993035] mmc0: sdhci: AC12 err: 0x00000004 | Slot int: 0x00000000
[ 3841.993039] mmc0: sdhci: Caps: 0x25f8c8bf | Caps_1: 0x00002077
[ 3841.993044] mmc0: sdhci: Cmd: 0x0000123a | Max curr: 0x005800c8
[ 3841.993048] mmc0: sdhci: Resp[0]: 0x00000000 | Resp[1]: 0x00000000
[ 3841.993052] mmc0: sdhci: Resp[2]: 0x00000000 | Resp[3]: 0x00000800
[ 3841.993055] mmc0: sdhci: Host ctl2: 0x0000800b
[ 3841.993059] mmc0: sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x37400208
[ 3841.993060] mmc0: sdhci: ============================================
[ 3841.993209] mmcblk0: error -84 sending status command, retrying
[ 3842.044004] mmc0: Tuning timeout, falling back to fixed sampling clock
[ 3842.044201] mmcblk0: error -110 sending stop command, original cmd response 0x0, card status 0x900
[ 3842.044203] mmcblk0: error -110 transferring data, sector 0, nr 8, cmd response 0x0, card status 0x0
[ 3842.044208] mmcblk0: retrying using single block read
[ 3842.056999] mmcblk0: p1
[ 3934.384760] mmc0: card 59b4 removed
编辑:
[user@e470-arch ~]$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 5986:2109 Acer, Inc
Bus 001 Device 002: ID 0cf3:e500 Qualcomm Atheros Communications
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[user@e470-arch ~]$ lspci
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers (rev 02)
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 620 (rev 02)
00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21)
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-LP Thermal subsystem (rev 21)
00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI #1 (rev 21)
00:17.0 SATA controller: Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode] (rev 21)
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #1 (rev f1)
00:1c.4 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #5 (rev f1)
00:1d.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #9 (rev f1)
00:1d.2 PCI bridge: Intel Corporation Device 9d1a (rev f1)
00:1d.3 PCI bridge: Intel Corporation Device 9d1b (rev f1)
00:1f.0 ISA bridge: Intel Corporation Sunrise Point-LP LPC Controller (rev 21)
00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21)
00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21)
00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21)
02:00.0 SD Host controller: O2 Micro, Inc. SD/MMC Card Reader Controller (rev 01)
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 10)
05:00.0 Network controller: Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter (rev 31)
还有这个:
[ 0.686312] sdhci-pci 0000:02:00.0: SDHCI controller found [1217:8621] (rev 1)
[ 0.686405] sdhci-pci 0000:02:00.0: enabling device (0000 -> 0002)
[ 0.687346] mmc0: Unknown controller version (3). You may experience problems.
答案1
对于任何偶然发现这一点的人来说,这对我有用:
我的 Thinkpad E480 出现“错误 -84 / 调整超时”问题;运行 Xubuntu 18.04。在深入研究驱动程序代码后,我尝试了与时钟调整相关的模块怪异标志(SDHCI_QUIRK2_TUNING_WORK_AROUND)。
在 sdhci 和 sdhci_pci 的 rmmod 之后,我重新加载了它 - 卡出现没有错误:
sudo modprobe sdhci "debug_quirks2=0x1000"; sudo modprobe sdhci_pci
FWIW 还有更多与时钟/延迟相关的标志,您可以检查 sdhci.h 以获得完整列表(每行注释)。
答案2
造成此问题的原因之一是您的 sdhci 驱动程序“太快”。在启用设备时钟(sdhci_enable_clk
)后插入一个小的延迟可以“修复”某些卡。
在最新的内核中,可以在 arasan 主机控制器的设备树中启用此问题的解决方法。看https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=26c312281336b55eba01ea1e7b85740d383076c6