mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2024-11-22 04:56:15 +00:00
69dd5a788f
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.37 Added: generic/hack-6.6/900-fix-build-to-handle-return-value.patch[1] Manually rebased: generic/pending-6.6/834-ledtrig-libata.patch Removed upstreamed: bcm27xx/patches-6.6/950-0398-drm-panel-panel-ilitek9881c-Use-cansleep-methods.patch[2] All other patches automatically rebased. 1. Patch suggested by @DragonBluep to circumvent upstream breakage of kernel 6.6.37 compilation. See comments in https://github.com/openwrt/openwrt/pull/15879 for additional discussion. 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.37&id=1618f7a875ffd916596392fd29880c0429b8af60 Build system: x86/64 Build-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3 Run-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3 Signed-off-by: John Audia <therealgraysky@proton.me> Link: https://github.com/openwrt/openwrt/pull/15879 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
48 lines
1.6 KiB
Diff
48 lines
1.6 KiB
Diff
From 2862884dd5281299433d641c00d419640bb03d7f Mon Sep 17 00:00:00 2001
|
|
From: Jonathan Bell <jonathan@raspberrypi.com>
|
|
Date: Tue, 4 Jun 2024 13:45:37 +0100
|
|
Subject: [PATCH 1116/1135] mmc: sdhci: extend maximum ADMA transfer length to
|
|
4MiB
|
|
|
|
This gains about 8-12% sequential write speed with the fastest SD/eMMC
|
|
cards, and Class A1/A2 card sequential performance is only assured with
|
|
a 4MiB write length.
|
|
|
|
Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
|
---
|
|
drivers/mmc/host/sdhci.c | 15 ++++++++++-----
|
|
1 file changed, 10 insertions(+), 5 deletions(-)
|
|
|
|
--- a/drivers/mmc/host/sdhci.c
|
|
+++ b/drivers/mmc/host/sdhci.c
|
|
@@ -1081,7 +1081,7 @@ static void sdhci_initialize_data(struct
|
|
WARN_ON(host->data);
|
|
|
|
/* Sanity checks */
|
|
- BUG_ON(data->blksz * data->blocks > 524288);
|
|
+ BUG_ON(data->blksz * data->blocks > host->mmc->max_req_size);
|
|
BUG_ON(data->blksz > host->mmc->max_blk_size);
|
|
BUG_ON(data->blocks > 65535);
|
|
|
|
@@ -4727,11 +4727,16 @@ int sdhci_setup_host(struct sdhci_host *
|
|
spin_lock_init(&host->lock);
|
|
|
|
/*
|
|
- * Maximum number of sectors in one transfer. Limited by SDMA boundary
|
|
- * size (512KiB). Note some tuning modes impose a 4MiB limit, but this
|
|
- * is less anyway.
|
|
+ * Maximum number of sectors in one transfer.
|
|
+ * 4MiB is preferred for multi-descriptor DMA as a) card sequential
|
|
+ * write speeds are only guaranteed with a 4MiB write length and
|
|
+ * b) most tuning modes require a 4MiB limit.
|
|
+ * SDMA has a 512KiB boundary size.
|
|
*/
|
|
- mmc->max_req_size = 524288;
|
|
+ if (host->flags & SDHCI_USE_ADMA)
|
|
+ mmc->max_req_size = SZ_4M;
|
|
+ else
|
|
+ mmc->max_req_size = SZ_512K;
|
|
|
|
/*
|
|
* Maximum number of segments. Depends on if the hardware
|