1217:8520 [Dell Latitude E7450] O2 Micro, SD/MMC Card Reader doesn't work

Bug #1523178 reported by Blackgr on 2015-12-05
54
This bug affects 9 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Medium
Unassigned

Bug Description

Under ubuntu 15.10 I can't use my Sandisk ultra 64GB microSD (with a SD card adapter) with the built in SD card reader. I seem to be getting the following errors.

[ 1268.126602] sdhci: Timeout waiting for Buffer Read Ready interrupt during tuning procedure, falling back to fixed sampling clock
[ 1268.128381] mmc0: tuning execution failed
[ 1268.128386] mmc0: error -5 whilst initialising SD card
[ 1268.554319] sdhci: Timeout waiting for Buffer Read Ready interrupt during tuning procedure, falling back to fixed sampling clock
[ 1268.556098] mmc0: tuning execution failed
[ 1268.556103] mmc0: error -5 whilst initialising SD card
[ 1268.993995] sdhci: Timeout waiting for Buffer Read Ready interrupt during tuning procedure, falling back to fixed sampling clock
[ 1268.995778] mmc0: tuning execution failed
[ 1268.995786] mmc0: error -5 whilst initialising SD card
[ 1269.453666] sdhci: Timeout waiting for Buffer Read Ready interrupt during tuning procedure, falling back to fixed sampling clock
[ 1269.455449] mmc0: tuning execution failed
[ 1269.455458] mmc0: error -5 whilst initialising SD card

It was working fine under vivid with kernel 3.19.

Went through all the kernels from 3.19 to 4.2 (http://kernel.ubuntu.com/~kernel-ppa/) and found out that until 4.1.8-040108-generic the SD card reader would play fine and only after I put 4.1.9 and on I started getting the errors.

WORKAROUND: rmmod sdhci sdhci_pci sdhci_acpi
modprobe sdhci debug_quirks2="0x10000"
modprobe sdhci_pci

ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: linux-image-4.2.0-19-generic 4.2.0-19.23
ProcVersionSignature: Ubuntu 4.2.0-19.23-generic 4.2.6
Uname: Linux 4.2.0-19-generic x86_64
ApportVersion: 2.19.1-0ubuntu5
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC2: alex 1606 F.... pulseaudio
 /dev/snd/controlC0: alex 1606 F.... pulseaudio
 /dev/snd/controlC1: alex 1606 F.... pulseaudio
CurrentDesktop: Unity
Date: Sun Dec 6 01:40:18 2015
HibernationDevice: RESUME=UUID=acf75838-59f9-4461-9fe4-e9bdf33b28be
InstallationDate: Installed on 2015-10-27 (38 days ago)
InstallationMedia: Ubuntu 14.04.3 LTS "Trusty Tahr" - Beta amd64 (20150805)
MachineType: Dell Inc. Latitude E7450
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.2.0-19-generic root=UUID=c654e4bc-b0e1-4a85-844f-99f068b2efff ro quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-4.2.0-19-generic N/A
 linux-backports-modules-4.2.0-19-generic N/A
 linux-firmware 1.149.3
SourcePackage: linux
UpgradeStatus: Upgraded to wily on 2015-11-04 (31 days ago)
dmi.bios.date: 10/28/2015
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A08
dmi.board.name: 0R1VJD
dmi.board.vendor: Dell Inc.
dmi.board.version: A00
dmi.chassis.type: 9
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvrA08:bd10/28/2015:svnDellInc.:pnLatitudeE7450:pvr:rvnDellInc.:rn0R1VJD:rvrA00:cvnDellInc.:ct9:cvr:
dmi.product.name: Latitude E7450
dmi.sys.vendor: Dell Inc.

Blackgr (blackfate86) wrote :

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed

Blackgr, thank you for reporting this and helping make Ubuntu better.

Could you please test the latest upstream kernel available from the very top line at the top of the page from http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D (the release names are irrelevant for testing, and please do not test the daily folder)? Install instructions are available at https://wiki.ubuntu.com/Kernel/MainlineBuilds . This will allow additional upstream developers to examine the issue.

If the latest kernel did not allow you to test to the issue (ex. you couldn't boot into the OS) please make a comment in your report about this, and continue to test the next most recent kernel version until you can test to the issue. Once you've tested the upstream kernel, please comment on which kernel version specifically you tested. If this issue is fixed in the mainline kernel, please add the following tags by clicking on the yellow circle with a black pencil icon, next to the word Tags, located at the bottom of the report description:
kernel-fixed-upstream
kernel-fixed-upstream-X.Y-rcZ

Where X, and Y are the first two numbers of the kernel version, and Z is the release candidate number if it exists.

If the mainline kernel does not fix the issue, please add the following tags:
kernel-bug-exists-upstream
kernel-bug-exists-upstream-X.Y-rcZ

Please note, an error to install the kernel does not fit the criteria of kernel-bug-exists-upstream.

Once testing of the latest upstream kernel is complete, please mark this report's Status as Confirmed. Please let us know your results.

Thank you for your understanding.

tags: added: latest-bios-a08
Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete
Blackgr (blackfate86) wrote :

Thank you Christopher for the feedback,
I just tested the latest upstream kernel ap per your instructions and I still get the same errors.

$ uname -a
Linux cosmo 4.4.0-040400rc3-generic #201511300321 SMP Mon Nov 30 03:23:36 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

tags: added: kernel-bug-exists-upstream kernel-bug-exists-upstream-4.4-rc3
Changed in linux (Ubuntu):
status: Incomplete → Confirmed

Blackgr, the next step is to fully commit bisect from kernel 4.1.8 to 4.1.9 in order to identify the last good kernel commit, followed immediately by the first bad one. This will allow for a more expedited analysis of the root cause of your issue. Could you please do this following https://wiki.ubuntu.com/Kernel/KernelBisection ?

Please note, finding adjacent kernel versions is not fully commit bisecting.

Thank you for your understanding.

Helpful bug reporting tips:
https://wiki.ubuntu.com/ReportingBugs

tags: added: needs-bisect regression-release
Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Blackgr (blackfate86) wrote :

Hello Christopher,

Thanks for the tips. Please refer to the bisect log

git bisect start 'Ubuntu-4.2.0-19.23' 'Ubuntu-4.1.0-3.3'
# good: [b953c0d234bc72e8489d3bf51a276c5c4ec85345] Linux 4.1
git bisect good b953c0d234bc72e8489d3bf51a276c5c4ec85345
# good: [3d9f96d850e4bbfae24dc9aee03033dd77c81596] Merge tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
git bisect good 3d9f96d850e4bbfae24dc9aee03033dd77c81596
# good: [93899e39e86bfc021a190a9c26e8e516561f2756] Merge git://www.linux-watchdog.org/linux-watchdog
git bisect good 93899e39e86bfc021a190a9c26e8e516561f2756
# good: [7c764cec3703583247c4ab837c652975a3d41f4b] Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
git bisect good 7c764cec3703583247c4ab837c652975a3d41f4b
# skip: [a0f195ea58d336cf32e3b15bba2f2b98dcc53c01] UBUNTU: SAUCE: (no-up) Allow filtering of cpufreq drivers
git bisect skip a0f195ea58d336cf32e3b15bba2f2b98dcc53c01
# bad: [aa608500538d801d77adc768e8bd07e73c817795] mei: me: d0i3: exit d0i3 on driver start and enter it on stop
git bisect bad aa608500538d801d77adc768e8bd07e73c817795
# good: [42c7443496288aab3504a2e9dc61930cc96f92a5] memory-hotplug: add hot-added memory ranges to memblock before allocate node_data for a node.
git bisect good 42c7443496288aab3504a2e9dc61930cc96f92a5
# bad: [392bd716c9fd3719eb44a06106f45488ec266fe2] UBUNTU: SAUCE: AUFS
git bisect bad 392bd716c9fd3719eb44a06106f45488ec266fe2
# bad: [a54023dd9723880fa089e8740d23145368a30234] UBUNTU: [debian] Use SRCPKGNAME as prefix for indep linux headers package
git bisect bad a54023dd9723880fa089e8740d23145368a30234
# good: [8fd1f7a1c4bbfb43f3f17d12f5c60925ebd9dd6c] svcrdma: Change maximum server payload back to RPCSVC_MAXPAYLOAD
git bisect good 8fd1f7a1c4bbfb43f3f17d12f5c60925ebd9dd6c
# bad: [001fc2f5d7ee719cf698eee845bc95d468b16380] phylib: fix device deletion order in mdiobus_unregister()
git bisect bad 001fc2f5d7ee719cf698eee845bc95d468b16380
# bad: [218014334367fca6910477b2430dfa6680eebdf7] iommu/tegra-smmu: Parameterize number of TLB lines
git bisect bad 218014334367fca6910477b2430dfa6680eebdf7
# good: [4f7760e963db10618dd3617bcf6254d896094e37] workqueue: Make flush_workqueue() available again to non GPL modules
git bisect good 4f7760e963db10618dd3617bcf6254d896094e37
# bad: [149faccaa3a057a07c6029f7d9d74bb3d163492c] mmc: sdhci: also get preset value and driver type for MMC_DDR52
git bisect bad 149faccaa3a057a07c6029f7d9d74bb3d163492c
# good: [89234d155665290f6e84bba9be37c8536a594d32] fs: Don't dump core if the corefile would become world-readable.
git bisect good 89234d155665290f6e84bba9be37c8536a594d32
# bad: [9a139a471fc6c0e91fbf794df3f4ded9ad5fd31a] mmc: sdhci-of-esdhc: add workaround for pre divider initial value
git bisect bad 9a139a471fc6c0e91fbf794df3f4ded9ad5fd31a
# bad: [e6c69099f63c84e1825c0f742a76ff4a8afeaa9b] mmc: sdhci-pci: set the clear transfer mode register quirk for O2Micro
git bisect bad e6c69099f63c84e1825c0f742a76ff4a8afeaa9b
# first bad commit: [e6c69099f63c84e1825c0f742a76ff4a8afeaa9b] mmc: sdhci-pci: set the clear transfer mode register quirk for O2Micro

Thanks

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Blackgr (blackfate86) on 2015-12-09
summary: - SD card reader on Dell E7450 doesn't work in Ubuntu 15.10
+ SD card reader on Dell E7450 doesn't work in Ubuntu 15.10 - O2 Micro,
+ Inc. SD/MMC Card Reader Controller [1217:8520]

Can verify that after removing the following bit and recompiled the kernel, the SD card reader played fine.

diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c
index b3b0a3e..27b0e11 100644
--- a/drivers/mmc/host/sdhci-pci.c
+++ b/drivers/mmc/host/sdhci-pci.c
@@ -618,7 +618,7 @@ static int jmicron_resume(struct sdhci_pci_chip *chip)
 static const struct sdhci_pci_fixes sdhci_o2 = {
        .probe = sdhci_pci_o2_probe,
        .quirks = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
- .quirks2 = SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD,
+ /* .quirks2 = SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD, */
        .probe_slot = sdhci_pci_o2_probe_slot,
        .resume = sdhci_pci_o2_resume,
 };

Blackgr, lastly, could you please test the latest mainline kernel (4.4-rc4) and advise to the results?

tags: added: bisect-done
removed: needs-bisect
summary: - SD card reader on Dell E7450 doesn't work in Ubuntu 15.10 - O2 Micro,
- Inc. SD/MMC Card Reader Controller [1217:8520]
+ 1217:8520 [Dell Latitude E7450] O2 Micro, SD/MMC Card Reader doesn't
+ work
Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Blackgr (blackfate86) wrote :

Hello Christopher,

This is still an issue with the latest mainline kernel (4.4-rc4)
$ uname -a
Linux cosmo 4.4.0-040400rc4-generic #201512061930 SMP Mon Dec 7 00:32:31 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

[ 1.248191] mmc0: tuning execution failed
[ 1.248195] mmc0: error -5 whilst initialising SD card
[ 1.680188] mmc0: tuning execution failed
[ 1.680192] mmc0: error -5 whilst initialising SD card
[ 2.120160] mmc0: tuning execution failed
[ 2.120163] mmc0: error -5 whilst initialising SD card
[ 2.564165] mmc0: tuning execution failed
[ 2.564420] mmc0: error -5 whilst initialising SD card

Thanks

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Blackgr (blackfate86) on 2015-12-11
tags: added: kernel-bug-exists-upstream-4.4-rc4
removed: kernel-bug-exists-upstream-4.4-rc3

Blackgr, the issue you are reporting is an upstream one. Could you please report this problem following the instructions verbatim at https://wiki.ubuntu.com/Bugs/Upstream/kernel to the appropriate venue (TO Adam Lee, Peter Guo, and Ulf Hansson CC linux-mmc)?

Please provide a direct URL to your newly made report when it becomes available so that it may be tracked.

Thank you for your understanding.

Changed in linux (Ubuntu):
status: Confirmed → Triaged
Blackgr (blackfate86) wrote :

Hello Christopher,

Raised https://bugzilla.kernel.org/show_bug.cgi?id=109231

Could not include the people you mentioned though.
Please let me know if anything is missing.

Thanks

Blackgr (blackfate86) wrote :
Blackgr (blackfate86) wrote :

This is still an issue under 16.04
Workaround provided under https://bugzilla.kernel.org/show_bug.cgi?id=109231#c3

Blackgr, to clarify, you personally tested this WORKAROUND and it worked for your hardware?

tags: added: xenial
Blackgr (blackfate86) wrote :

Yes Christopher,

I verify that I personally tested the WORKAROUND. I'm the Alex Ballas who raised the bug report in the first place.

description: updated
Martin (g-martin-2) wrote :

Bug still affects 16.04.01 with Kernel 4.4.0-34-generic.
That workaround does the trick, though.

Pierre Equoy (pieq) wrote :

I just got the same issue on a Dell Latitude E5550 using 16.04.1 (kernel 4.4.0-57-generic).

The workaround described above works. For people who may be in a similar situation:

    sudo rmmod sdhci_pci sdhci_acpi
    sudo rmmod sdhci
    sudo modprobe sdhci debug_quirks2="0x10000"
    sudo modprobe sdhci_pci

I can then access a 64GB Micro SDXC card (through an SD card adapter)

Blackgr, to keep this relevant to upstream, one would want to periodically check for, and test the latest mainline kernel (now 4.10-rc3) as it is released.

Could you please advise?

Changed in linux (Ubuntu):
status: Triaged → Incomplete
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.