mmc_select_hs400 failed, error -74

Bug #1559870 reported by Shih-Yuan Lee
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

I used "Ubuntu 16.04 LTS "Xenial Xerus" - Alpha amd64 (20160307)" from http://cdimage.ubuntu.com/daily-live/current/.
But it can not find the built-in eMMC storage and it shows the following messages.

[ 12.355182] sdhci-pci 0000:00:1e.4: No vmmc regulator found
[ 12.355185] sdhci-pci 0000:00:1e.4: No vqmmc regulator found
[ 12.358331] mmc0: SDHCI controller on PCI [0000:00:1e.4] using ADMA 64-bit
[ 12.359549] sdhci-pci 0000:00:1e.6: No vmmc regulator found
[ 12.359552] sdhci-pci 0000:00:1e.6: No vqmmc regulator found
[ 12.362713] mmc1: SDHCI controller on PCI [0000:00:1e.6] using ADMA 64-bit
[ 12.472768] mmc0: MAN_BKOPS_EN bit is not set
[ 12.489132] mmc0: mmc_select_hs400 failed, error -74
[ 12.489134] mmc0: error -74 whilst initialising MMC card
[ 12.601333] mmc0: MAN_BKOPS_EN bit is not set
[ 12.617263] mmc0: mmc_select_hs400 failed, error -74
[ 12.617280] mmc0: error -74 whilst initialising MMC card
[ 12.745957] mmc0: MAN_BKOPS_EN bit is not set
[ 12.764502] mmc0: mmc_select_hs400 failed, error -74
[ 12.764519] mmc0: error -74 whilst initialising MMC card
[ 12.923969] mmc0: MAN_BKOPS_EN bit is not set
[ 12.948561] mmc0: mmc_select_hs400 failed, error -74
[ 12.948580] mmc0: error -74 whilst initialising MMC card

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: linux-image-4.4.0-10-generic 4.4.0-10.25
ProcVersionSignature: Ubuntu 4.4.0-10.25-generic 4.4.3
Uname: Linux 4.4.0-10-generic x86_64
ApportVersion: 2.20-0ubuntu3
Architecture: amd64
CasperVersion: 1.367
CurrentDesktop: Unity
Date: Mon Mar 21 06:20:39 2016
LiveMediaBuild: Ubuntu 16.04 LTS "Xenial Xerus" - Alpha amd64 (20160307)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/casper/vmlinuz.efi file=/cdrom/preseed/username.seed boot=casper quiet splash ---
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.board.name: STCK2MV64CC
dmi.product.name: STCK2MV64CC

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :
Revision history for this message
Brad Figg (brad-figg) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :
Download full text (5.7 KiB)

commit 1815e61b1a7efe81017a883e817292daf7d2f922
Author: Adrian Hunter <email address hidden>
Date: Wed Oct 28 14:25:40 2015 +0200

    mmc: mmc: Improve reliability of mmc_select_hs200()

    Currently mmc_select_hs200() uses __mmc_switch() which checks the
    success of the switch to HS200 mode using CMD13 (SEND_STATUS).
    The problem is that it does that using the timing settings of legacy
    mode. That is prone to error, not least because the timing parameters
    for legacy mode are tighter than the timing parameters for HS200 mode.

    In the case when CMD13 polling is used (i.e. not MMC_CAP_WAIT_WHILE_BUSY)
    with the switch command, it must be assumed that using different modes on
    the card and host must work.

    However in the case when CMD13 polling is not used
    (i.e. MMC_CAP_WAIT_WHILE_BUSY) mmc_select_hs200() can be made more
    reliable by setting the host to the correct timing before sending CMD13.

    This patch does that.

    A complication is that the caller, mmc_select_timing(), will ignore a
    switch error (indicated by -EBADMSG), assume the old mode is valid
    and continue, so the old timing must be restored in that case.

    Signed-off-by: Adrian Hunter <email address hidden>
    Cc: <email address hidden> # 4.2+
    Tested-by: Alim Akhtar <email address hidden>
    Signed-off-by: Ulf Hansson <email address hidden>

commit 51b12f7764fa8bb464cbd0f7bbd3a408d21ade16
Author: Adrian Hunter <email address hidden>
Date: Wed Oct 28 14:25:41 2015 +0200

    mmc: mmc: Fix HS setting in mmc_select_hs400()

    mmc_select_hs400() begins with the card and host in HS200 mode.
    Therefore, any commands sent to the card should use HS200 timing.
    It is incorrect to set the host to High Speed (HS) timing before
    sending the switch command. Doing so is unreliable because
    the timing parameters for HS mode are tighter than the timing
    parameters for HS200 mode. Thus the HS timings should be set
    only after the card has switched mode.

    However, it is not unreasonable first to reduce the frequency to
    the HS mode frequency, which should make the switch command and
    subsequent CMD13 commands more reliable.

    This patch does that.

    Signed-off-by: Adrian Hunter <email address hidden>
    Cc: <email address hidden> # 4.2+
    Tested-by: Alim Akhtar <email address hidden>
    Signed-off-by: Ulf Hansson <email address hidden>

commit 974007aaf240aa195b31c34cfdb013524a2dcfca
Author: Adrian Hunter <email address hidden>
Date: Wed Oct 28 14:25:42 2015 +0200

    mmc: mmc: Move mmc_switch_status()

    Move the mmc_switch_status() function in preparation for calling it
    in mmc_select_hs400().

    Signed-off-by: Adrian Hunter <email address hidden>
    Cc: <email address hidden> # 4.2+
    Tested-by: Alim Akhtar <email address hidden>
    Signed-off-by: Ulf Hansson <email address hidden>

commit d23029332c3d51fb5ac117ba5cde4dc0a3ec3fa6
Author: Adrian Hunter <email address hidden>
Date: Wed Oct 28 14:25:43 2015 +0200

    mmc: mmc: Improve reliability of mmc_select_hs400()

    mmc_select_hs400() calls __m...

Read more...

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :

The patches in comment #3 can be found in the v4.5 kernel.

Changed in linux (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

The four commits in comment #3 are all in the kernel as of 4.4-rc2:

~/src/linux$ git describe --contains 1815e61b
v4.4-rc2~25^2~7
~/src/linux$ git describe --contains 51b12f77
v4.4-rc2~25^2~6
~/src/linux$ git describe --contains 974007aa
v4.4-rc2~25^2~5
~/src/linux$ git describe --contains d2302933
v4.4-rc2~25^2~4

Are you sure those are the correct commits to resolve this bug?

tags: added: kernel-da-key
Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :

These patches are mentioned in an email thread by Adrian Hunter (one of the primary maintainers of the MMC module in the kernel).
I will do some check for these patches.
Before I confirm which patches are needed, I set this issue incomplete temporarily.
This issue was reported also existed in Ubuntu 15.10, however I tested the mainline kernel v4.5 and it works fine.

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :

I tested Ubuntu 16.04 LTS "Xenial Xerus" - Beta amd64 (20160323) and there is no problem now.
3efcd738cff03d2d579e08f55117111d *ubuntu-16.04-beta2-desktop-amd64.iso

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

Other bug subscribers

Remote bug watches

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