[openwrt/openwrt] uboot-mediatek: fix MMC erase timeout
LEDE Commits
lede-commits at lists.infradead.org
Thu Feb 15 11:35:03 PST 2024
dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/89fcf211cb64619911533622f6380dafb268225f
commit 89fcf211cb64619911533622f6380dafb268225f
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Tue Dec 5 04:08:13 2023 +0000
uboot-mediatek: fix MMC erase timeout
When erasing large amounts of blocks at once this can take a long
time on slow cards. Instead of a fixed timeout, wait longer if more
blocks are being erased.
Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
.../uboot-mediatek/patches/250-fix-mmc-erase-timeout.patch | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/package/boot/uboot-mediatek/patches/250-fix-mmc-erase-timeout.patch b/package/boot/uboot-mediatek/patches/250-fix-mmc-erase-timeout.patch
new file mode 100644
index 0000000000..ec9fa6f3a0
--- /dev/null
+++ b/package/boot/uboot-mediatek/patches/250-fix-mmc-erase-timeout.patch
@@ -0,0 +1,13 @@
+diff --git a/drivers/mmc/mmc_write.c b/drivers/mmc/mmc_write.c
+index a6f93380dd0..5c573fe5c4c 100644
+--- a/drivers/mmc/mmc_write.c
++++ b/drivers/mmc/mmc_write.c
+@@ -80,7 +80,7 @@ ulong mmc_berase(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt)
+ u32 start_rem, blkcnt_rem, erase_args = 0;
+ struct mmc *mmc = find_mmc_device(dev_num);
+ lbaint_t blk = 0, blk_r = 0;
+- int timeout_ms = 1000;
++ int timeout_ms = blkcnt;
+
+ if (!mmc)
+ return -1;
More information about the lede-commits
mailing list