FS#38628 - [linux] 3.12: SD host does not recognize any SD card

Attached to Project: Arch Linux
Opened by Thore Oltersdorf (yodi) - Thursday, 23 January 2014, 10:20 GMT
Last edited by Andreas Radke (AndyRTR) - Friday, 07 May 2021, 09:20 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Tobias Powalowski (tpowa)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 5
Private No

Details

Description:
Recognizing of any SD Card fails by SD Host controller: O2 Micro, Inc. Device 8520 (rev 01)


Additional info:
* package version(s)
linux 3.12.8-1
linux-api-headers 3.12.4-1
linux-firmware 20131230.52d77db-1
linux-headers 3.12.8-1

* config and/or log files etc.
# dmesg | grep mmc
[ 2.412190] mmc0: Unknown controller version (3). You may experience problems.
[ 2.412219] mmc0: Hardware doesn't specify timeout clock frequency.

# lspci
11:00.0 SD Host controller: O2 Micro, Inc. Device 8520 (rev 01)

Steps to reproduce:
According to Adam Lee from Canonical this bug can be reproduced with the following hardware:
Card readers on Lenovo ThinkPad W540, Dell Latitude E5440 and Dell Latitude
E6540 don't work without this patch. My own mobile computer is a Dell Precision M6800.

Patch for mmc-next already written: http://article.gmane.org/gmane.linux.kernel.mmc/24244
See also Bug Report on Launchpad: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1239938
This task depends upon

Closed by  Andreas Radke (AndyRTR)
Friday, 07 May 2021, 09:20 GMT
Reason for closing:  Upstream
Comment by Gerardo Exequiel Pozzi (djgera) - Thursday, 06 February 2014, 19:53 GMT
  • Field changed: Summary ([linux.kernel.mmc] SD host does not recognize any SD card → [linux] 3.12: SD host does not recognize any SD card)
  • Field changed: Status (Unconfirmed → Assigned)
  • Field changed: Category (Packages: Core → Upstream Bugs)
  • Task assigned to Thomas Bächler (brain0), Tobias Powalowski (tpowa)
status with 3.13?
Comment by Thore Oltersdorf (yodi) - Saturday, 15 February 2014, 10:12 GMT
Sorry for this delay. I cannot report the status with 3.13 but by using the 3.14-rc2 mainline kernel from AUR I was able to mount the SD card without any problems.
If wanted I can deliver the diff between 3.12 and 3.14.
Comment by Dennis (dennis123123) - Saturday, 22 February 2014, 08:21 GMT
This bug is still present in 3.13.4-1-ARCH

Same dmesg error as in original post, and SD cards do not get recognised
I've got a Dell E6540
Comment by Dennis (dennis123123) - Monday, 24 February 2014, 08:46 GMT
Also still present in 3.13.5-1-ARCH
Comment by Dennis (dennis123123) - Tuesday, 25 March 2014, 19:43 GMT
Also still present in 3.13.7-1-ARCH
Comment by Dennis (dennis123123) - Thursday, 03 April 2014, 08:43 GMT
Also still present in 3.13.8-1-ARCH
Comment by Dennis (dennis123123) - Thursday, 10 April 2014, 17:43 GMT
Finally fixed in 3.14.0-4-ARCH :)
Comment by Arch Linux User (archie0) - Monday, 06 July 2015, 03:17 GMT
  • Field changed: Percent Complete (100% → 0%)
Still present in 4.0.7-2

SD Host controller: O2 Micro, Inc. SD/MMC Card Reader Controller (rev 01) (prog-if 01)
Comment by Arch Linux User (archie0) - Monday, 20 July 2015, 12:42 GMT
Still happens in 4.1.2-2-ARCH. However, it reads SD cards just fine.

SD Host controller: O2 Micro, Inc. SD/MMC Card Reader Controller (rev 01) (prog-if 01)
Subsystem: Dell Device 05bd
Flags: bus master, fast devsel, latency 0, IRQ 19
Memory at f7a01000 (32-bit, non-prefetchable) [size=4K]
Memory at f7a00000 (32-bit, non-prefetchable) [size=2K]
Capabilities: <access denied>
Kernel driver in use: sdhci-pci
Kernel modules: sdhci_pci

Comment by Remko (Malrak) - Monday, 07 December 2015, 13:23 GMT
Still present in 4.2.5-1-ARCH.
Dell Latitude E6540
Comment by Eduardo Leggiero (EduardoLeggiero) - Thursday, 24 December 2015, 10:31 GMT
Still present in 4.2.5-1-ARCH
Dell Precision M2800

> lspci -vv

0e:00.0 SD Host controller: O2 Micro, Inc. SD/MMC Card Reader Controller (rev 01) (prog-if 01)
Subsystem: Dell Device 0684
Flags: bus master, fast devsel, latency 0, IRQ 19
Memory at f7a01000 (32-bit, non-prefetchable) [size=4K]
Memory at f7a00000 (32-bit, non-prefetchable) [size=2K]
Capabilities: [6c] Power Management version 3
Capabilities: [48] MSI: Enable- Count=1/1 Maskable+ 64bit+
Capabilities: [80] Express Endpoint, MSI 00
Capabilities: [100] Virtual Channel
Capabilities: [200] Advanced Error Reporting
Capabilities: [230] Latency Tolerance Reporting
Kernel driver in use: sdhci-pci
Kernel modules: sdhci_pci
Comment by Jeffrey Clark (h0tw1r3) - Wednesday, 03 February 2016, 16:20 GMT
Temporary work-around, tested on Dell E5450 with kernel 4.4.1.

Add option debug_quirks2="0x4" to sdhci module.

> echo 'options sdhci debug_quirks2="0x4"' > /etc/modprobe.d/sdhci.conf
Comment by Dominik Lenoch (dlenoch) - Wednesday, 09 March 2016, 13:48 GMT
Still present in 4.4.3-1.
Lenovo W541
Not read sdcards.

> dmesg | grep mmc
[ 2.040059] mmc0: Unknown controller version (3). You may experience problems.
[ 2.040107] sdhci-pci 0000:02:00.0: No vmmc regulator found
[ 2.040109] sdhci-pci 0000:02:00.0: No vqmmc regulator found
[ 2.041248] mmc0: SDHCI controller on PCI [0000:02:00.0] using ADMA

> dmesg | grep 02:00.0
[ 2.038278] sdhci-pci 0000:02:00.0: SDHCI controller found [1217:8520] (rev 1)
[ 2.040107] sdhci-pci 0000:02:00.0: No vmmc regulator found
[ 2.040109] sdhci-pci 0000:02:00.0: No vqmmc regulator found
[ 2.041248] mmc0: SDHCI controller on PCI [0000:02:00.0] using ADMA
[ 2.381048] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
[ 2.382361] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded

lspci -vv
02:00.0 SD Host controller: O2 Micro, Inc. SD/MMC Card Reader Controller (rev 01) (prog-if 01)
Subsystem: Lenovo Device 2211
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 16
Region 0: Memory at b4901000 (32-bit, non-prefetchable) [size=4K]
Region 1: Memory at b4900000 (32-bit, non-prefetchable) [size=2K]
Capabilities: <access denied>
Kernel driver in use: sdhci-pci
Kernel modules: sdhci_pci
Comment by Addi Abel (addi) - Wednesday, 14 December 2016, 08:52 GMT
still present after last update.
Linux 4.8.13-1-ARCH #1 SMP PREEMPT Fri Dec 9 07:24:34 CET 2016 x86_64 GNU/Linux
ThinkPad W541

lspci -vv -s 02:00.0
02:00.0 SD Host controller: O2 Micro, Inc. SD/MMC Card Reader Controller (rev 01) (prog-if 01)
Subsystem: Lenovo Device 2211
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 16
Region 0: Memory at b4901000 (32-bit, non-prefetchable) [size=4K]
Region 1: Memory at b4900000 (32-bit, non-prefetchable) [size=2K]
Capabilities: [6c] Power Management version 3
Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA PME(D0-,D1-,D2-,D3hot+,D3cold+)
Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [48] MSI: Enable- Count=1/1 Maskable+ 64bit+
Address: 0000000000000000 Data: 0000
Masking: 00000000 Pending: 00000000
Capabilities: [80] Express (v2) Endpoint, MSI 00
DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s <4us, L1 unlimited
ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset- SlotPowerLimit 10.000W
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd+ ExtTag- PhantFunc- AuxPwr+ NoSnoop+
MaxPayload 128 bytes, MaxReadReq 128 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <512ns, L1 unlimited
ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp-
LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes Disabled- CommClk-
ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt-
DevCap2: Completion Timeout: Not Supported, TimeoutDis-, LTR+, OBFF Not Supported
DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR+, OBFF Disabled
LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
Compliance De-emphasis: -6dB
LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete-, EqualizationPhase1-
EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
Capabilities: [100 v1] Virtual Channel
Caps: LPEVC=0 RefClk=100ns PATEntryBits=1
Arb: Fixed- WRR32- WRR64- WRR128-
Ctrl: ArbSelect=Fixed
Status: InProgress-
VC0: Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
Arb: Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
Ctrl: Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
Status: NegoPending- InProgress-
Capabilities: [200 v1] Advanced Error Reporting
UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
AERCap: First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn-
Capabilities: [230 v1] Latency Tolerance Reporting
Max snoop latency: 3145728ns
Max no snoop latency: 3145728ns
Kernel driver in use: sdhci-pci
Kernel modules: sdhci_pci

dmesg | grep -E 'mmc|02:00.0'
[ 1.171334] pci 0000:02:00.0: [1217:8520] type 00 class 0x080501
[ 1.171374] pci 0000:02:00.0: reg 0x10: [mem 0xb4901000-0xb4901fff]
[ 1.171398] pci 0000:02:00.0: reg 0x14: [mem 0xb4900000-0xb49007ff]
[ 1.171648] pci 0000:02:00.0: PME# supported from D3hot D3cold
[ 4.089622] sdhci-pci 0000:02:00.0: SDHCI controller found [1217:8520] (rev 1)
[ 4.091463] mmc0: Unknown controller version (3). You may experience problems.
[ 4.094858] mmc0: SDHCI controller on PCI [0000:02:00.0] using ADMA
[ 4.435363] ata6.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
[ 4.439438] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
[ 4.440096] ata6.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
[ 4.440771] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
Comment by Alex Mantel (ellcs) - Thursday, 05 January 2017, 17:25 GMT
Hey, i had the same issue! Since it's reopened and i didn't find a workaround pretty fast

these commands should allow you to use your SD-Card, according to 0xf8.org [1]:

rmmod sdhci sdhci_pci sdhci_acpi
modprobe sdhci debug_quirks2="0x4"
modprobe sdhci_pci

However, there is also an issue under kernel.org [1], which notes that instead
of "0x4", the value of debug_quirks2 should be set to "0x10000".

Hope this is useful :)

[1] - http://www.0xf8.org/2016/01/workaround-for-broken-o2-micro-sd-card-reader-support-since-linux-kernel-version-4-1-8/
[0] - https://bugzilla.kernel.org/show_bug.cgi?id=109231#c3

Loading...