1

I've installed Arch Linux on ThinkPad E470 and I'm facing some SD card reader problems.

I can read and write from card, but when I'm, working with the card, there are some random lags and computer freeze for a second or two.

For now Google did not helped. This is what kernel says every few minutes. The card is working in my other (older) machines without any problems.

[ 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

EDIT:

[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)

And also this:

[    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.
  • Looks like new kernel did the trick, now: [user@e470-arch ~]$ uname -a Linux e470-arch 4.15.14-1-ARCH #1 SMP PREEMPT Wed Mar 28 17:34:29 UTC 2018 x86_64 GNU/Linux And it's OK. – František Š. Apr 3 '18 at 8:21
  • OK it did not solved the problem. Only one reboot it was OK, now it's buggy again. – František Š. Apr 4 '18 at 5:39
2

One cause of this problem is when your sdhci driver is "too fast". Inserting a small delay after enabling the device clock (sdhci_enable_clk) can "fix" some cards.

On recent kernels a workaround for this problem can be enabled in the device tree for arasan host controllers. See https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=26c312281336b55eba01ea1e7b85740d383076c6

  • Thanks for reply. That could be solution. Is there way to do it automatically? Removing module and adding it again works until next restart / suspend. – František Š. Jun 4 '18 at 8:48
  • arasan controllers need a device tree. So your device tree should enable the workaround if necessary. If your controller is not arasan, the mentioned patch does not help in any way. – Helmut Nov 8 '18 at 10:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.