Go to file
Martin Blumenstingl 71149a8a1c mmc: meson-mx-sdio: trigger a soft reset after a timeout or CRC error
BugLink: https://bugs.launchpad.net/bugs/1885023

[ Upstream commit 91995b904e ]

The vendor driver (from the 3.10 kernel) triggers a soft reset every
time before starting a new command. While this fixes a problem where
SDIO cards are not detected at all (because all commands simply
timed out) this hurts SD card read performance a bit (in my tests
between 10% to 20%).

Trigger a soft reset after we got a CRC error or if the previous command
timed out (just like the vendor driver from the same 3.10 kernel for the
newer SDHC controller IP does). This fixes detection of SDIO cards and
doesn't hurt SD card read performance at the same time.

With this patch the initialization of an RTL8723BS SDIO card looks like
this:
  req done (CMD52): -110: 00000000 00000000 00000000 00000000
  clock 400000Hz busmode 2 powermode 2 cs 1 Vdd 21 width 1 timing 0
  starting CMD0 arg 00000000 flags 000000c0
  req done (CMD0): 0: 00000000 00000000 00000000 00000000
  clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 1 timing 0
  starting CMD8 arg 000001aa flags 000002f5
  req done (CMD8): -110: 00000000 00000000 00000000 00000000
  starting CMD5 arg 00000000 flags 000002e1
  req done (CMD5): 0: 90ff0000 00000000 00000000 00000000
  starting CMD5 arg 00200000 flags 000002e1
  req done (CMD5): 0: 90ff0000 00000000 00000000 00000000
  starting CMD3 arg 00000000 flags 00000075
  req done (CMD3): 0: 00010000 00000000 00000000 00000000
  starting CMD7 arg 00010000 flags 00000015
  req done (CMD7): 0: 00001e00 00000000 00000000 00000000
  starting CMD52 arg 00000000 flags 00000195
  req done (CMD52): 0: 00001032 00000000 00000000 00000000
  [... more CMD52 omitted ...]
  clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 1 timing 2
  clock 50000000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 1 timing 2
  starting CMD52 arg 00000e00 flags 00000195
  req done (CMD52): 0: 00001000 00000000 00000000 00000000
  starting CMD52 arg 80000e02 flags 00000195
  req done (CMD52): 0: 00001002 00000000 00000000 00000000
  clock 50000000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 4 timing 2
  starting CMD52 arg 00020000 flags 00000195
  req done (CMD52): 0: 00001007 00000000 00000000 00000000
  [... more CMD52 omitted ...]
  new high speed SDIO card at address 0001

Fixes: ed80a13bb4 ("mmc: meson-mx-sdio: Add a driver for the Amlogic Meson8 and Meson8b SoCs")
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20200503222805.2668941-1-martin.blumenstingl@googlemail.com
Tested-by: Tobias Baumann <017623705678@o2online.de>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
2020-08-08 01:53:12 -04:00
Documentation lib/lzo: fix ambiguous encoding bug in lzo-rle 2020-08-08 01:53:12 -04:00
LICENSES LICENSES: Rename other to deprecated 2019-05-03 06:34:32 -06:00
arch ARM: 8978/1: mm: make act_mm() respect THREAD_SIZE 2020-08-08 01:53:12 -04:00
block block: reset mapping if failed to update hardware queue count 2020-08-08 01:53:12 -04:00
certs certs: Add wrapper function to check blacklisted binary hash 2020-04-06 13:47:55 -05:00
crypto crypto: drbg - fix error return code in drbg_alloc_state() 2020-08-08 01:53:12 -04:00
debian UBUNTU: update dkms package versions 2020-07-03 10:26:59 +02:00
debian.master UBUNTU: upstream stable to v5.4.47 2020-08-08 01:53:12 -04:00
drivers mmc: meson-mx-sdio: trigger a soft reset after a timeout or CRC error 2020-08-08 01:53:12 -04:00
fs btrfs: do not ignore error from btrfs_next_leaf() when inserting checksums 2020-08-08 01:53:12 -04:00
include dccp: Fix possible memleak in dccp_init and dccp_fini 2020-08-08 01:53:12 -04:00
init x86: Fix early boot crash on gcc-10, third try 2020-06-22 17:22:07 -03:00
ipc ipc/util.c: sysvipc_find_ipc() incorrectly updates position index 2020-06-22 17:21:43 -03:00
kernel kgdb: Prevent infinite recursive entries to the debugger 2020-08-08 01:53:12 -04:00
lib lib/lzo: fix ambiguous encoding bug in lzo-rle 2020-08-08 01:53:12 -04:00
mm hugetlbfs: take read_lock on i_mmap for PMD sharing 2020-08-08 01:53:12 -04:00
net batman-adv: Revert "disable ethtool link speed detection when auto negotiation off" 2020-08-08 01:53:12 -04:00
samples samples: bpf: Fix build error 2020-06-22 17:23:17 -03:00
scripts bpf: Support llvm-objcopy for vmlinux BTF 2020-08-08 01:53:12 -04:00
security lockdown: Allow unprivileged users to see lockdown status 2020-08-08 01:53:12 -04:00
sound ALSA: hda/realtek: Add mute LED and micmute LED support for HP systems 2020-08-08 01:53:12 -04:00
tools libbpf: Fix memory leak and possible double-free in hashmap__clear 2020-08-08 01:53:12 -04:00
ubuntu UBUNTU: hio -- remove duplicated MODULE_DEVICE_TABLE declaration 2020-03-18 12:02:49 +01:00
usr initramfs: restore default compression behavior 2020-04-29 16:25:32 +02:00
virt KVM: arm64: Save the host's PtrAuth keys in non-preemptible context 2020-08-08 01:53:12 -04:00
.clang-format clang-format: Update with the latest for_each macro list 2019-08-31 10:00:51 +02:00
.cocciconfig
.get_maintainer.ignore Opt out of scripts/get_maintainer.pl 2019-05-16 10:53:40 -07:00
.gitattributes
.gitignore UBUNTU: [debian] Initial debian and ubuntu directories 2019-11-25 14:56:22 +01:00
.mailmap ARM: SoC fixes 2019-11-10 13:41:59 -08:00
COPYING COPYING: use the new text with points to the license files 2018-03-23 12:41:45 -06:00
CREDITS MAINTAINERS: Remove Simon as Renesas SoC Co-Maintainer 2019-10-10 08:12:51 -07:00
Kbuild kbuild: do not descend to ./Kbuild when cleaning 2019-08-21 21:03:58 +09:00
Kconfig UBUNTU: [debian] Initial debian and ubuntu directories 2019-11-25 14:56:22 +01:00
MAINTAINERS s390/pci: Documentation for zPCI 2020-06-22 17:21:13 -03:00
Makefile Linux 5.4.47 2020-08-08 01:53:12 -04:00
README Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00
dropped.txt UBUNTU: [debian] Initial debian and ubuntu directories 2019-11-25 14:56:22 +01:00
snapcraft.yaml UBUNTU: [debian] Initial debian and ubuntu directories 2019-11-25 14:56:22 +01:00
update-version-dkms UBUNTU: [Packaging] Add BugLink to update-version-dkms commit 2020-03-20 17:27:55 -05:00

README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.