mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-30 10:39:04 +00:00
4c1d13e995
Removed because it is upstream:
generic/pending-5.15/540-ksmbd-only-v2-leases-handle-the-directory.patch
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=81ea755b8fa57ce186f56f14b709cf491c2a5505
Manually Adapted the following patches:
ath79/patches-5.15/900-unaligned_access_hacks.patch
ipq806x/patches-5.15/113-v5.19-03-PM-devfreq-Rework-freq_table-to-be-local-to-devfr.patch
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 26d1d52403
)
39 lines
1.4 KiB
Diff
39 lines
1.4 KiB
Diff
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
|
|
@@ -1930,7 +1930,11 @@ static void mmc_blk_mq_rw_recovery(struc
|
|
return;
|
|
}
|
|
|
|
- if (rq_data_dir(req) == READ && brq->data.blocks >
|
|
+ /*
|
|
+ * XXX: don't do single-sector reads, as it leaks a SG DMA
|
|
+ * mapping when reusing the still-pending req.
|
|
+ */
|
|
+ if (0 && rq_data_dir(req) == READ && brq->data.blocks >
|
|
queue_physical_block_size(mq->queue) >> 9) {
|
|
/* Read one (native) sector at a time */
|
|
mmc_blk_read_single(mq, req);
|