diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2022-05-16 23:40:32 +0200 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2022-05-17 15:11:22 +0200 |
commit | 20ea6adbf199097c4f5f591ffee088340630dae4 (patch) | |
tree | d6719d95e136611a1c25bbf7789652d6d402779d /target/linux/bcm27xx/patches-5.15/950-0914-mmc-block-Don-t-do-single-sector-reads-during-recove.patch | |
parent | bca05bd072180dc38ef740b37ded9572a6db1981 (diff) | |
download | upstream-20ea6adbf199097c4f5f591ffee088340630dae4.tar.gz upstream-20ea6adbf199097c4f5f591ffee088340630dae4.tar.bz2 upstream-20ea6adbf199097c4f5f591ffee088340630dae4.zip |
bcm27xx: add support for linux v5.15
Build system: x86_64
Build-tested: bcm2708, bcm2709, bcm2710, bcm2711
Run-tested: bcm2708/RPiB+, bcm2709/RPi3B, bcm2710/RPi3B, bcm2711/RPi4B
Signed-off-by: Marty Jones <mj8263788@gmail.com>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bcm27xx/patches-5.15/950-0914-mmc-block-Don-t-do-single-sector-reads-during-recove.patch')
-rw-r--r-- | target/linux/bcm27xx/patches-5.15/950-0914-mmc-block-Don-t-do-single-sector-reads-during-recove.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.15/950-0914-mmc-block-Don-t-do-single-sector-reads-during-recove.patch b/target/linux/bcm27xx/patches-5.15/950-0914-mmc-block-Don-t-do-single-sector-reads-during-recove.patch new file mode 100644 index 0000000000..da9c428efb --- /dev/null +++ b/target/linux/bcm27xx/patches-5.15/950-0914-mmc-block-Don-t-do-single-sector-reads-during-recove.patch @@ -0,0 +1,38 @@ +From b70da899940777d92338d8f83f7a6236818ad08a Mon Sep 17 00:00:00 2001 +From: Jonathan Bell <jonathan@raspberrypi.com> +Date: Mon, 16 May 2022 10:28:27 +0100 +Subject: [PATCH] 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: Jonathan Bell <jonathan@raspberrypi.com> +--- + drivers/mmc/core/block.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +--- a/drivers/mmc/core/block.c ++++ b/drivers/mmc/core/block.c +@@ -1871,7 +1871,11 @@ static void mmc_blk_mq_rw_recovery(struc + } + + /* FIXME: Missing single sector read for large sector size */ +- if (!mmc_large_sector(card) && rq_data_dir(req) == READ && ++ /* ++ * XXX: don't do single-sector reads, as it leaks a SG DMA ++ * mapping when reusing the still-pending req. ++ */ ++ if (0 && !mmc_large_sector(card) && rq_data_dir(req) == READ && + brq->data.blocks > 1) { + /* Read one sector at a time */ + mmc_blk_read_single(mq, req); |