mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-18 21:28:02 +00:00
01d8e41c16
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.51 Removed upstreamed: generic/backport-6.6/200-regmap-maple-work-around-false-positive-warning.patch generic/backport-6.6/822-v6.11-0012-nvmem-Fix-return-type-of-devm_nvmem_device_get-in-ke.patch bcm27xx/patches-6.6/950-1018-drivers-mmc-apply-SD-quirks-earlier-during-probe.patch Manually rebased: bcm27xx/patches-6.6/950-0993-drivers-mmc-cqhci-clear-CQHCI_CTL-if-halt-fails.patch ramips/patches-6.6/311-MIPS-use-set_mode-to-enable-disable-the-cevt-r4k-irq.patch[4] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.51&id=e42ea96d6d36a16526cb82b8aa2e5422814c3250 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.51&id=3d1baf322a3a69b38b6b2d511cfe0d611d1b5462 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.51&id=115a755bb38db5a1175be44e6a9a93a0a8233885 4. Adapted the changes from Hauke Mehrtens' modification in PR#16366 to 5.15.167 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/16370 Signed-off-by: Robert Marko <robimarko@gmail.com>
47 lines
1.5 KiB
Diff
47 lines
1.5 KiB
Diff
From fe98179e184bdb0ff7061d1a026f82b749854720 Mon Sep 17 00:00:00 2001
|
|
From: Jonathan Bell <jonathan@raspberrypi.com>
|
|
Date: Tue, 26 Mar 2024 13:17:10 +0000
|
|
Subject: [PATCH 0993/1085] drivers: mmc: cqhci: clear CQHCI_CTL if halt fails
|
|
|
|
The eMMC spec says that in certain circumstances the controller can't
|
|
respond to a halt request - in practice, this occurs if a CMD
|
|
timeout happens (card went away/crashed).
|
|
|
|
Clear the halt request by writing 0 to CQHCI_CTL. Also fix a logic error
|
|
testing for halt in cqhci_request.
|
|
|
|
Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
|
---
|
|
drivers/mmc/host/cqhci-core.c | 13 +++++++++----
|
|
1 file changed, 9 insertions(+), 4 deletions(-)
|
|
|
|
--- a/drivers/mmc/host/cqhci-core.c
|
|
+++ b/drivers/mmc/host/cqhci-core.c
|
|
@@ -383,9 +383,11 @@ static void cqhci_off(struct mmc_host *m
|
|
|
|
err = readx_poll_timeout(cqhci_read_ctl, cq_host, reg,
|
|
reg & CQHCI_HALT, 0, CQHCI_OFF_TIMEOUT);
|
|
- if (err < 0)
|
|
+ if (err < 0) {
|
|
pr_err("%s: cqhci: CQE stuck on\n", mmc_hostname(mmc));
|
|
- else
|
|
+ /* eMMC v5.1 B.2.8 recommends writing 0 to CQHCI_CTL if stuck */
|
|
+ cqhci_writel(cq_host, 0, CQHCI_CTL);
|
|
+ } else
|
|
pr_debug("%s: cqhci: CQE off\n", mmc_hostname(mmc));
|
|
|
|
if (cq_host->ops->post_disable)
|
|
@@ -975,8 +977,11 @@ static bool cqhci_halt(struct mmc_host *
|
|
|
|
ret = cqhci_halted(cq_host);
|
|
|
|
- if (!ret)
|
|
+ if (!ret) {
|
|
pr_warn("%s: cqhci: Failed to halt\n", mmc_hostname(mmc));
|
|
+ /* eMMC v5.1 B.2.8 recommends writing 0 to CQHCI_CTL if stuck */
|
|
+ cqhci_writel(cq_host, 0, CQHCI_CTL);
|
|
+ }
|
|
|
|
return ret;
|
|
}
|