Skip to content
Commit e1f6a099 authored by Jonathan Bell's avatar Jonathan Bell Committed by Dom Cobley
Browse files

mmc: block: Don't do single-sector reads during recovery

See https://github.com/raspberrypi/linux/issues/5019



If an SD card has degraded performance such that IO operations time out
then the MMC block layer will leak SG DMA mappings in the swiotlb during
recovery. It retries the same SG and this causes the leak, as it is
mapped twice - once in sdhci_pre_req() and again during single-block
reads in sdhci_prepare_data().

Resetting the card (including power-cycling if a regulator for vmmc is
present) ought to be enough to recover a stuck state, so for now don't
try single-block reads in the recovery path.

Signed-off-by: default avatarJonathan Bell <jonathan@raspberrypi.com>
parent ffc21e58
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment