* [PATCH 01/13] mmc: cavium: Remove MMC slots before destroying slot platform devices
2026-11-23 19:15 [PATCH 00/13] mmc: Assorted bug fixes across MMC host drivers Lee Jones
@ 2026-11-23 19:15 ` Lee Jones
2026-11-23 19:15 ` [PATCH 02/13] mmc: cavium: Prevent slot_pdev[] out-of-bounds write during probe Lee Jones
` (11 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Lee Jones @ 2026-11-23 19:15 UTC (permalink / raw)
To: lee, Robert Richter, Ulf Hansson, Cavium Inc, Huacai Chen,
Binbin Zhou, Guangshuo Li, linux-mmc, linux-kernel
Cc: stable
cvm_mmc_of_slot_probe() allocates each slot and its struct mmc_host via
devm_mmc_alloc_host() bound to the dummy slot platform device created in
octeon_mmc_probe() and thunder_mmc_probe(), and indexes host->slot[] by
the Device Tree reg property while host->slot_pdev[] is indexed by the
child iteration counter.
When a slot reg index is greater than its child iteration index (for
example when only slot 1 is populated or enabled), the single teardown
loop in probe error handling and driver removal calls
of_platform_device_destroy() on the slot platform device before calling
cvm_mmc_of_slot_remove() on its corresponding host->slot[] entry.
Unregistering the unbound platform device immediately releases its
managed resources, freeing slot regulators and dropping the initial
struct mmc_host reference via mmc_free_host() while the MMC host is
still registered. The subsequent cvm_mmc_of_slot_remove() call then
accesses freed regulator state and frees struct mmc_host and private
slot memory mid-way through mmc_remove_host(), resulting in a
use-after-free.
Remove all populated MMC slots in a first pass before destroying the
child slot platform devices in a second pass across both probe error and
driver removal paths.
Fixes: f32b90e6887f ("mmc: cavium: Use devm_mmc_alloc_host() helper")
Fixes: 0f4d4424fc1d ("mmc: cavium-octeon: destroy slot platform devices on remove")
Fixes: 29ee8cf18a21 ("mmc: cavium-thunderx: destroy slot platform devices on remove")
Closes: https://sashiko.dev/#/bug/linux-f5f8989d-5e08-46d1-91a1-69841c36692b
Cc: stable@vger.kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
---
drivers/mmc/host/cavium-octeon.c | 4 ++++
drivers/mmc/host/cavium-thunderx.c | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/drivers/mmc/host/cavium-octeon.c b/drivers/mmc/host/cavium-octeon.c
index dd62b96712c8..7b75b3dfd3e6 100644
--- a/drivers/mmc/host/cavium-octeon.c
+++ b/drivers/mmc/host/cavium-octeon.c
@@ -283,6 +283,8 @@ static int octeon_mmc_probe(struct platform_device *pdev)
for (i = 0; i < CAVIUM_MAX_MMC; i++) {
if (host->slot[i])
cvm_mmc_of_slot_remove(host->slot[i]);
+ }
+ for (i = 0; i < CAVIUM_MAX_MMC; i++) {
if (host->slot_pdev[i])
of_platform_device_destroy(&host->slot_pdev[i]->dev, NULL);
}
@@ -298,6 +300,8 @@ static void octeon_mmc_remove(struct platform_device *pdev)
for (i = 0; i < CAVIUM_MAX_MMC; i++) {
if (host->slot[i])
cvm_mmc_of_slot_remove(host->slot[i]);
+ }
+ for (i = 0; i < CAVIUM_MAX_MMC; i++) {
if (host->slot_pdev[i])
of_platform_device_destroy(&host->slot_pdev[i]->dev, NULL);
}
diff --git a/drivers/mmc/host/cavium-thunderx.c b/drivers/mmc/host/cavium-thunderx.c
index 526ae9019b2f..b8296b2de127 100644
--- a/drivers/mmc/host/cavium-thunderx.c
+++ b/drivers/mmc/host/cavium-thunderx.c
@@ -157,6 +157,8 @@ static int thunder_mmc_probe(struct pci_dev *pdev,
for (i = 0; i < CAVIUM_MAX_MMC; i++) {
if (host->slot[i])
cvm_mmc_of_slot_remove(host->slot[i]);
+ }
+ for (i = 0; i < CAVIUM_MAX_MMC; i++) {
if (host->slot_pdev[i])
of_platform_device_destroy(&host->slot_pdev[i]->dev, NULL);
}
@@ -173,6 +175,8 @@ static void thunder_mmc_remove(struct pci_dev *pdev)
for (i = 0; i < CAVIUM_MAX_MMC; i++) {
if (host->slot[i])
cvm_mmc_of_slot_remove(host->slot[i]);
+ }
+ for (i = 0; i < CAVIUM_MAX_MMC; i++) {
if (host->slot_pdev[i])
of_platform_device_destroy(&host->slot_pdev[i]->dev, NULL);
}
--
2.56.1.750.gf70dc682cf-goog
^ permalink raw reply [flat|nested] 15+ messages in thread* [PATCH 02/13] mmc: cavium: Prevent slot_pdev[] out-of-bounds write during probe
2026-11-23 19:15 [PATCH 00/13] mmc: Assorted bug fixes across MMC host drivers Lee Jones
2026-11-23 19:15 ` [PATCH 01/13] mmc: cavium: Remove MMC slots before destroying slot platform devices Lee Jones
@ 2026-11-23 19:15 ` Lee Jones
2026-11-23 19:15 ` [PATCH 03/13] mmc: sdhci-msm: Resume runtime PM before accessing registers on remove Lee Jones
` (10 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Lee Jones @ 2026-11-23 19:15 UTC (permalink / raw)
To: lee, Robert Richter, Ulf Hansson, Cavium Inc, Jan Glauber,
linux-mmc, linux-kernel
Cc: stable
octeon_mmc_probe() and thunder_mmc_probe() iterate over Device Tree
child nodes and store each created slot platform device in
host->slot_pdev[i], which is sized to CAVIUM_MAX_MMC (4). Neither
function checks that i remains below CAVIUM_MAX_MMC before writing to
host->slot_pdev[i], and both increment i even for disabled or
non-mmc-slot child nodes. When a controller node has more than four
child nodes (or four valid mmc-slot nodes alongside another child node
on ThunderX), host->slot_pdev[i] writes past the end of the array and
corrupts the adjacent set_shared_power and acquire_bus callback
pointers in struct cvm_mmc_host.
Iterate only over available child nodes, advance the slot_pdev[] index
only when a slot platform device is created, and fail the probe with
-EINVAL if more than CAVIUM_MAX_MMC slots are present.
Fixes: 8fb83b142823 ("mmc: cavium: Fix probing race with regulator")
Fixes: 166bac38c3c5 ("mmc: cavium: Add MMC PCI driver for ThunderX SOCs")
Closes: https://sashiko.dev/#/bug/linux-022f7ab4-a7fe-4881-b87d-613d4b8f010f
Closes: https://sashiko.dev/#/bug/linux-04e9d7cc-573a-4ea4-ab4e-d65b9b0626ac
Cc: stable@vger.kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
---
drivers/mmc/host/cavium-octeon.c | 13 +++++++++----
drivers/mmc/host/cavium-thunderx.c | 11 +++++++++--
2 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/drivers/mmc/host/cavium-octeon.c b/drivers/mmc/host/cavium-octeon.c
index 7b75b3dfd3e6..375d8f23b26e 100644
--- a/drivers/mmc/host/cavium-octeon.c
+++ b/drivers/mmc/host/cavium-octeon.c
@@ -262,13 +262,18 @@ static int octeon_mmc_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, host);
i = 0;
- for_each_child_of_node_scoped(node, cn) {
+ for_each_available_child_of_node_scoped(node, cn) {
+ if (i >= CAVIUM_MAX_MMC) {
+ dev_err(&pdev->dev, "Too many slots\n");
+ ret = -EINVAL;
+ octeon_mmc_set_shared_power(host, 0);
+ goto error;
+ }
host->slot_pdev[i] =
of_platform_device_create(cn, NULL, &pdev->dev);
- if (!host->slot_pdev[i]) {
- i++;
+ if (!host->slot_pdev[i])
continue;
- }
+
ret = cvm_mmc_of_slot_probe(&host->slot_pdev[i]->dev, host);
if (ret) {
dev_err(&pdev->dev, "Error populating slots\n");
diff --git a/drivers/mmc/host/cavium-thunderx.c b/drivers/mmc/host/cavium-thunderx.c
index b8296b2de127..a5346fb96f9b 100644
--- a/drivers/mmc/host/cavium-thunderx.c
+++ b/drivers/mmc/host/cavium-thunderx.c
@@ -129,7 +129,7 @@ static int thunder_mmc_probe(struct pci_dev *pdev,
if (ret)
goto error;
- for_each_child_of_node(node, child_node) {
+ for_each_available_child_of_node(node, child_node) {
/*
* mmc_of_parse and devm* require one device per slot.
* Create a dummy device per slot and set the node pointer to
@@ -137,6 +137,13 @@ static int thunder_mmc_probe(struct pci_dev *pdev,
* of_platform_device_create.
*/
if (of_device_is_compatible(child_node, "mmc-slot")) {
+ if (i >= CAVIUM_MAX_MMC) {
+ dev_err(dev, "Too many slots\n");
+ of_node_put(child_node);
+ ret = -EINVAL;
+ goto error;
+ }
+
host->slot_pdev[i] = of_platform_device_create(child_node, NULL,
&pdev->dev);
if (!host->slot_pdev[i])
@@ -147,8 +154,8 @@ static int thunder_mmc_probe(struct pci_dev *pdev,
of_node_put(child_node);
goto error;
}
+ i++;
}
- i++;
}
dev_info(dev, "probed\n");
return 0;
--
2.56.1.750.gf70dc682cf-goog
^ permalink raw reply [flat|nested] 15+ messages in thread* [PATCH 03/13] mmc: sdhci-msm: Resume runtime PM before accessing registers on remove
2026-11-23 19:15 [PATCH 00/13] mmc: Assorted bug fixes across MMC host drivers Lee Jones
2026-11-23 19:15 ` [PATCH 01/13] mmc: cavium: Remove MMC slots before destroying slot platform devices Lee Jones
2026-11-23 19:15 ` [PATCH 02/13] mmc: cavium: Prevent slot_pdev[] out-of-bounds write during probe Lee Jones
@ 2026-11-23 19:15 ` Lee Jones
2026-11-23 19:15 ` [PATCH 04/13] mmc: meson-gx: Fail request when descriptor chain DMA mapping fails Lee Jones
` (9 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Lee Jones @ 2026-11-23 19:15 UTC (permalink / raw)
To: lee, Adrian Hunter, Ulf Hansson, Ritesh Harjani, Georgi Djakov,
Pramod Gurav, linux-mmc, linux-arm-msm, linux-kernel
Cc: stable
During driver unbind, __device_release_driver() drops its temporary
runtime PM reference via pm_runtime_put_sync() immediately before
invoking sdhci_msm_remove(). If the 50 ms autosuspend delay has already
elapsed, sdhci_msm_runtime_suspend() gates msm_host->bulk_clks before
sdhci_msm_remove() is entered.
sdhci_msm_remove() currently reads SDHCI_INT_STATUS and calls
sdhci_remove_host() before waking the device via pm_runtime_get_sync(),
performing MMIO accesses while the controller interface and core clocks
are disabled and triggering a synchronous external abort on Qualcomm
platforms.
Wake the device with pm_runtime_get_sync() and disable runtime PM prior
to reading SDHCI_INT_STATUS and calling sdhci_remove_host(), matching
other SDHCI platform drivers.
Fixes: 67e6db113c90 ("mmc: sdhci-msm: Add pm_runtime and system PM support")
Closes: https://sashiko.dev/#/bug/linux-5ebb28b3-9cdd-4423-bfe8-361008b2aa89
Cc: stable@vger.kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
---
drivers/mmc/host/sdhci-msm.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
index aecd425bf095..f62e942bf9f0 100644
--- a/drivers/mmc/host/sdhci-msm.c
+++ b/drivers/mmc/host/sdhci-msm.c
@@ -2925,15 +2925,15 @@ static void sdhci_msm_remove(struct platform_device *pdev)
struct sdhci_host *host = platform_get_drvdata(pdev);
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
struct sdhci_msm_host *msm_host = sdhci_pltfm_priv(pltfm_host);
- int dead = (readl_relaxed(host->ioaddr + SDHCI_INT_STATUS) ==
- 0xffffffff);
-
- sdhci_remove_host(host, dead);
+ int dead;
pm_runtime_get_sync(&pdev->dev);
pm_runtime_disable(&pdev->dev);
pm_runtime_put_noidle(&pdev->dev);
+ dead = (readl_relaxed(host->ioaddr + SDHCI_INT_STATUS) == 0xffffffff);
+ sdhci_remove_host(host, dead);
+
clk_bulk_disable_unprepare(ARRAY_SIZE(msm_host->bulk_clks),
msm_host->bulk_clks);
if (!IS_ERR(msm_host->bus_clk))
--
2.56.1.750.gf70dc682cf-goog
^ permalink raw reply [flat|nested] 15+ messages in thread* [PATCH 04/13] mmc: meson-gx: Fail request when descriptor chain DMA mapping fails
2026-11-23 19:15 [PATCH 00/13] mmc: Assorted bug fixes across MMC host drivers Lee Jones
` (2 preceding siblings ...)
2026-11-23 19:15 ` [PATCH 03/13] mmc: sdhci-msm: Resume runtime PM before accessing registers on remove Lee Jones
@ 2026-11-23 19:15 ` Lee Jones
2026-11-23 19:15 ` [PATCH 05/13] mmc: jz4740: Skip DMA cleanup in PIO mode during post_req Lee Jones
` (8 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Lee Jones @ 2026-11-23 19:15 UTC (permalink / raw)
To: lee, Ulf Hansson, Neil Armstrong, Kevin Hilman, Jerome Brunet,
Martin Blumenstingl, Heiner Kallweit, linux-mmc,
linux-arm-kernel, linux-amlogic, linux-kernel
Cc: stable
meson_mmc_pre_req() flags eligible transfers with
SD_EMMC_DESC_CHAIN_MODE before mapping the scatterlist with
dma_map_sg(). If dma_map_sg() fails and returns 0, meson_mmc_pre_req()
logs an error but leaves SD_EMMC_DESC_CHAIN_MODE set with
data->sg_count equal to 0. When meson_mmc_request() subsequently
dispatches the transfer to meson_mmc_desc_chain_transfer(), the
for_each_sg() loop executes zero iterations and
desc[data->sg_count - 1].cmd_cfg writes to desc[-1], corrupting memory
immediately preceding the coherent descriptor buffer before starting the
DMA engine.
Check that data->sg_count is non-zero before starting a descriptor chain
request in meson_mmc_request() and complete the request with -EINVAL if
mapping failed.
Fixes: 79ed05e329c3 ("mmc: meson-gx: add support for descriptor chain mode")
Closes: https://sashiko.dev/#/bug/linux-e22e5db6-4232-447c-82b0-6850ad48d2a2
Cc: stable@vger.kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
---
drivers/mmc/host/meson-gx-mmc.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
index d2b9b5df9596..f859d9ac0a0a 100644
--- a/drivers/mmc/host/meson-gx-mmc.c
+++ b/drivers/mmc/host/meson-gx-mmc.c
@@ -914,6 +914,13 @@ static void meson_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq)
if (host->needs_pre_post_req)
meson_mmc_pre_req(mmc, mrq);
+ if (mrq->data && meson_mmc_desc_chain_mode(mrq->data) &&
+ !mrq->data->sg_count) {
+ mrq->cmd->error = -EINVAL;
+ mmc_request_done(mmc, mrq);
+ return;
+ }
+
/* Stop execution */
writel(0, host->regs + SD_EMMC_START);
--
2.56.1.750.gf70dc682cf-goog
^ permalink raw reply [flat|nested] 15+ messages in thread* [PATCH 05/13] mmc: jz4740: Skip DMA cleanup in PIO mode during post_req
2026-11-23 19:15 [PATCH 00/13] mmc: Assorted bug fixes across MMC host drivers Lee Jones
` (3 preceding siblings ...)
2026-11-23 19:15 ` [PATCH 04/13] mmc: meson-gx: Fail request when descriptor chain DMA mapping fails Lee Jones
@ 2026-11-23 19:15 ` Lee Jones
2026-11-23 19:15 ` [PATCH 06/13] mmc: renesas_sdhi: Guard host->cmd access in internal DMAC issue work Lee Jones
` (7 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Lee Jones @ 2026-11-23 19:15 UTC (permalink / raw)
To: lee, Paul Cercueil, Ulf Hansson, Krzysztof Kozlowski,
Lars-Peter Clausen, Apelete Seketeli, linux-mips, linux-mmc,
linux-kernel
Cc: stable
When DMA channel acquisition fails during probe, the JZ4740 MMC driver
falls back to PIO mode with host->use_dma set to false and host->dma_tx
or host->dma_rx left holding an ERR_PTR() or released channel pointer.
Unlike jz4740_mmc_pre_request(), jz4740_mmc_post_request() does not
check host->use_dma before calling dmaengine_terminate_all() on error,
resulting in an invalid or dangling DMA channel pointer dereference
whenever a PIO data transfer encounters an error.
Return early from jz4740_mmc_post_request() when host->use_dma is false,
matching jz4740_mmc_pre_request().
Fixes: bb2f45927f8e ("mmc: jz4740: prepare next dma transfer in parallel with current transfer")
Closes: https://sashiko.dev/#/bug/linux-735efbcb-99f8-4d4a-8814-aa31e3634f29
Cc: stable@vger.kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
---
drivers/mmc/host/jz4740_mmc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/mmc/host/jz4740_mmc.c b/drivers/mmc/host/jz4740_mmc.c
index 923cf1450de5..e398a575f2dc 100644
--- a/drivers/mmc/host/jz4740_mmc.c
+++ b/drivers/mmc/host/jz4740_mmc.c
@@ -392,6 +392,9 @@ static void jz4740_mmc_post_request(struct mmc_host *mmc,
struct jz4740_mmc_host *host = mmc_priv(mmc);
struct mmc_data *data = mrq->data;
+ if (!host->use_dma)
+ return;
+
if (data && data->host_cookie != COOKIE_UNMAPPED)
jz4740_mmc_dma_unmap(host, data);
--
2.56.1.750.gf70dc682cf-goog
^ permalink raw reply [flat|nested] 15+ messages in thread* [PATCH 06/13] mmc: renesas_sdhi: Guard host->cmd access in internal DMAC issue work
2026-11-23 19:15 [PATCH 00/13] mmc: Assorted bug fixes across MMC host drivers Lee Jones
` (4 preceding siblings ...)
2026-11-23 19:15 ` [PATCH 05/13] mmc: jz4740: Skip DMA cleanup in PIO mode during post_req Lee Jones
@ 2026-11-23 19:15 ` Lee Jones
2026-11-23 19:15 ` [PATCH 07/13] mmc: tifm_sd: Synchronise timeout handler with request completion Lee Jones
` (6 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Lee Jones @ 2026-11-23 19:15 UTC (permalink / raw)
To: lee, Wolfram Sang, Ulf Hansson, Lad Prabhakar,
Uwe Kleine-König (The Capable Hub),
linux-mmc, linux-renesas-soc, linux-kernel
Cc: stable
renesas_sdhi_internal_dmac_issue_work_fn() unmasks TMIO_STAT_DATAEND and
dereferences host->cmd without holding host->lock or checking that
host->cmd is still non-NULL. If tmio_mmc_reset_work() times out and
clears host->cmd under host->lock after tmio_mmc_cmd_irq() queues
host->dma_issue, or if unmasking TMIO_STAT_DATAEND allows a concurrent
data-end error completion to clear host->cmd via
tmio_mmc_finish_request(), evaluating host->cmd->error triggers a NULL
pointer dereference. Unmasking TMIO_STAT_DATAEND outside host->lock
also races with concurrent updates to host->sdcard_irq_mask.
Acquire host->lock across renesas_sdhi_internal_dmac_issue_work_fn() and
bail out if host->cmd has already been cleared, matching the sibling
system DMAC implementation.
Fixes: c330601c9c93 ("mmc: renesas_sdhi: take DMA end interrupts into account")
Closes: https://sashiko.dev/#/bug/linux-57271e16-2f7e-4151-a686-57ab2474fe6f
Cc: stable@vger.kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
---
drivers/mmc/host/renesas_sdhi_internal_dmac.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/mmc/host/renesas_sdhi_internal_dmac.c b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
index 0c3967f758c2..6831fc34cd22 100644
--- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c
+++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
@@ -450,6 +450,13 @@ static void renesas_sdhi_internal_dmac_issue_work_fn(struct work_struct *work)
{
struct tmio_mmc_host *host = from_work(host, work, dma_issue);
struct renesas_sdhi *priv = host_to_priv(host);
+ unsigned long flags;
+
+ spin_lock_irqsave(&host->lock, flags);
+ if (!host->cmd) {
+ spin_unlock_irqrestore(&host->lock, flags);
+ return;
+ }
tmio_mmc_enable_mmc_irqs(host, TMIO_STAT_DATAEND);
@@ -462,6 +469,7 @@ static void renesas_sdhi_internal_dmac_issue_work_fn(struct work_struct *work)
if (test_bit(SDHI_DMA_END_FLAG_ACCESS, &priv->dma_priv.end_flags))
queue_work(system_bh_wq, &priv->dma_priv.dma_complete);
}
+ spin_unlock_irqrestore(&host->lock, flags);
}
static bool renesas_sdhi_internal_dmac_complete(struct tmio_mmc_host *host)
--
2.56.1.750.gf70dc682cf-goog
^ permalink raw reply [flat|nested] 15+ messages in thread* [PATCH 07/13] mmc: tifm_sd: Synchronise timeout handler with request completion
2026-11-23 19:15 [PATCH 00/13] mmc: Assorted bug fixes across MMC host drivers Lee Jones
` (5 preceding siblings ...)
2026-11-23 19:15 ` [PATCH 06/13] mmc: renesas_sdhi: Guard host->cmd access in internal DMAC issue work Lee Jones
@ 2026-11-23 19:15 ` Lee Jones
2026-11-23 19:15 ` [PATCH 08/13] mmc: omap: Shut down cover timer before disabling cover BH work Lee Jones
` (5 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Lee Jones @ 2026-11-23 19:15 UTC (permalink / raw)
To: lee, Alex Dubov, Ulf Hansson, Pierre Ossman, linux-mmc, linux-kernel
Cc: stable
tifm_sd_end_cmd() deletes host->timer with timer_delete() under
sock->lock, clears host->req to NULL, and completes the request via
mmc_request_done(). Because timer_delete() does not wait for an already
executing timer callback and tifm_sd_abort() reads the active command
opcode from host->req without holding sock->lock, a concurrent timeout
expiry can dereference a NULL or freed struct mmc_request and spuriously
eject the card after the request has already completed.
Serialise tifm_sd_abort() on sock->lock, return early if host->req has
already been cleared or the socket is being ejected, and snapshot the
command opcode and flags before releasing sock->lock prior to calling
tifm_eject().
Fixes: 91f8d0118a0e ("tifm: layout fixes, small changes to comments and printfs")
Closes: https://sashiko.dev/#/bug/linux-6535b228-4464-4a24-8fea-e969201c0f95
Cc: stable@vger.kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
---
drivers/mmc/host/tifm_sd.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/tifm_sd.c b/drivers/mmc/host/tifm_sd.c
index 28ab2526dab1..30935214d17c 100644
--- a/drivers/mmc/host/tifm_sd.c
+++ b/drivers/mmc/host/tifm_sd.c
@@ -776,12 +776,24 @@ static void tifm_sd_end_cmd(struct work_struct *t)
static void tifm_sd_abort(struct timer_list *t)
{
struct tifm_sd *host = timer_container_of(host, t, timer);
+ struct tifm_dev *sock = host->dev;
+ unsigned int opcode, cmd_flags;
+ unsigned long flags;
+
+ spin_lock_irqsave(&sock->lock, flags);
+ if (!host->req || host->eject) {
+ spin_unlock_irqrestore(&sock->lock, flags);
+ return;
+ }
+ opcode = host->req->cmd->opcode;
+ cmd_flags = host->cmd_flags;
+ spin_unlock_irqrestore(&sock->lock, flags);
pr_err("%s : card failed to respond for a long period of time "
"(%x, %x)\n",
- dev_name(&host->dev->dev), host->req->cmd->opcode, host->cmd_flags);
+ dev_name(&sock->dev), opcode, cmd_flags);
- tifm_eject(host->dev);
+ tifm_eject(sock);
}
static void tifm_sd_ios(struct mmc_host *mmc, struct mmc_ios *ios)
--
2.56.1.750.gf70dc682cf-goog
^ permalink raw reply [flat|nested] 15+ messages in thread* [PATCH 08/13] mmc: omap: Shut down cover timer before disabling cover BH work
2026-11-23 19:15 [PATCH 00/13] mmc: Assorted bug fixes across MMC host drivers Lee Jones
` (6 preceding siblings ...)
2026-11-23 19:15 ` [PATCH 07/13] mmc: tifm_sd: Synchronise timeout handler with request completion Lee Jones
@ 2026-11-23 19:15 ` Lee Jones
2026-11-23 19:15 ` [PATCH 09/13] mmc: renesas_sdhi: Disable internal DMAC BH work items on release Lee Jones
` (4 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Lee Jones @ 2026-11-23 19:15 UTC (permalink / raw)
To: lee, Aaro Koskinen, Ulf Hansson, Juha Yrjola, Tony Lindgren,
Hiroshi DOYU, Jarkko Lavinen, Pierre Ossman, Aubin Constans,
Michał Mirosław, Allen Pais, Christian Loehle,
linux-omap, linux-mmc, linux-kernel
Cc: stable
In mmc_omap_remove_slot(), cancel_work_sync(&slot->cover_bh_work) is
called before timer_delete_sync(&slot->cover_timer). Because
mmc_omap_cover_timer() queues slot->cover_bh_work and
mmc_omap_cover_bh_handler() rearms slot->cover_timer, a timer expiry
between the two calls (or a concurrent omap_mmc_notify_cover_event()
before platform cleanup) can re-queue cover_bh_work so that it runs
after the slot and its struct mmc_host have been freed.
When cover state polling is configured, shut down slot->cover_timer
first with timer_shutdown_sync() to prevent re-arming, and then stop
slot->cover_bh_work with disable_work_sync() so no further work can be
queued during teardown.
Fixes: 7584d276d47a ("MMC: OMAP: Use tasklet instead of workqueue for cover switch notification")
Fixes: 921c87ba3893 ("mmc: Convert from tasklet to BH workqueue")
Closes: https://sashiko.dev/#/bug/linux-f30b1077-ed4d-4d62-a07b-11fff78d42c5
Cc: stable@vger.kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
---
drivers/mmc/host/omap.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index 36df578298c3..55efc4ec9d03 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -1356,11 +1356,11 @@ static void mmc_omap_remove_slot(struct mmc_omap_slot *slot)
if (slot->pdata->name != NULL)
device_remove_file(&mmc->class_dev, &dev_attr_slot_name);
- if (slot->pdata->get_cover_state != NULL)
+ if (slot->pdata->get_cover_state) {
device_remove_file(&mmc->class_dev, &dev_attr_cover_switch);
-
- cancel_work_sync(&slot->cover_bh_work);
- timer_delete_sync(&slot->cover_timer);
+ timer_shutdown_sync(&slot->cover_timer);
+ disable_work_sync(&slot->cover_bh_work);
+ }
flush_workqueue(slot->host->mmc_omap_wq);
mmc_remove_host(mmc);
--
2.56.1.750.gf70dc682cf-goog
^ permalink raw reply [flat|nested] 15+ messages in thread* [PATCH 09/13] mmc: renesas_sdhi: Disable internal DMAC BH work items on release
2026-11-23 19:15 [PATCH 00/13] mmc: Assorted bug fixes across MMC host drivers Lee Jones
` (7 preceding siblings ...)
2026-11-23 19:15 ` [PATCH 08/13] mmc: omap: Shut down cover timer before disabling cover BH work Lee Jones
@ 2026-11-23 19:15 ` Lee Jones
2026-11-23 19:15 ` [PATCH 10/13] mmc: jz4740: Apply DMA max_seg_size limit to unified tx-rx channel Lee Jones
` (3 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Lee Jones @ 2026-11-23 19:15 UTC (permalink / raw)
To: lee, Wolfram Sang, Ulf Hansson, Lad Prabhakar,
Uwe Kleine-König (The Capable Hub),
Niklas Söderlund, Allen Pais, linux-mmc, linux-renesas-soc,
linux-kernel
Cc: stable
renesas_sdhi_internal_dmac_request_dma() initialises both
host->dma_issue and priv->dma_priv.dma_complete, which are queued onto
system_bh_wq during DMA transfers and error handling. However,
renesas_sdhi_internal_dmac_release_dma() only clears host->chan_rx and
host->chan_tx without disabling or draining either work item, allowing a
pending execution of renesas_sdhi_internal_dmac_complete_work_fn() or
renesas_sdhi_internal_dmac_issue_work_fn() to run after controller
clocks are disabled and the host structures are freed.
Disable and drain both work items with disable_work_sync() in
renesas_sdhi_internal_dmac_release_dma().
Fixes: 85683fb39d9b ("mmc: sdhi: Convert from tasklet to BH workqueue")
Closes: https://sashiko.dev/#/bug/linux-e1bb7b26-9b96-4c86-b680-6ce4e6a73315
Cc: stable@vger.kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
---
drivers/mmc/host/renesas_sdhi_internal_dmac.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/mmc/host/renesas_sdhi_internal_dmac.c b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
index 6831fc34cd22..a88946bdb567 100644
--- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c
+++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
@@ -573,6 +573,11 @@ renesas_sdhi_internal_dmac_request_dma(struct tmio_mmc_host *host,
static void
renesas_sdhi_internal_dmac_release_dma(struct tmio_mmc_host *host)
{
+ struct renesas_sdhi *priv = host_to_priv(host);
+
+ disable_work_sync(&host->dma_issue);
+ disable_work_sync(&priv->dma_priv.dma_complete);
+
/* Each value is set to zero to assume "disabling" each DMA */
host->chan_rx = host->chan_tx = NULL;
}
--
2.56.1.750.gf70dc682cf-goog
^ permalink raw reply [flat|nested] 15+ messages in thread* [PATCH 10/13] mmc: jz4740: Apply DMA max_seg_size limit to unified tx-rx channel
2026-11-23 19:15 [PATCH 00/13] mmc: Assorted bug fixes across MMC host drivers Lee Jones
` (8 preceding siblings ...)
2026-11-23 19:15 ` [PATCH 09/13] mmc: renesas_sdhi: Disable internal DMAC BH work items on release Lee Jones
@ 2026-11-23 19:15 ` Lee Jones
2026-11-23 19:15 ` [PATCH 11/13] mmc: dw_mmc: Disarm central watchdog when ending a request Lee Jones
` (2 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Lee Jones @ 2026-11-23 19:15 UTC (permalink / raw)
To: lee, Paul Cercueil, Ulf Hansson, Krzysztof Kozlowski,
Lars-Peter Clausen, Aidan MacDonald, linux-mips, linux-mmc,
linux-kernel
Cc: stable
Commit afadb04f1d6e ("mmc: jz4740: Apply DMA engine limits to maximum
segment size") added max_seg_size clamping at the end of
jz4740_mmc_acquire_dma_channels(), below the early return for the
unified "tx-rx" DMA channel added earlier by commit a474e52c3109 ("mmc:
jz4740: Support using a bi-directional DMA channel"). When "tx-rx" is
used, host->mmc->max_seg_size is never clamped to dma_get_max_seg_size()
and the MMC core can submit scatterlist segments exceeding the DMA
controller hardware limit.
Jump to the max_seg_size clamping block when acquiring the "tx-rx"
channel instead of returning early.
Fixes: afadb04f1d6e ("mmc: jz4740: Apply DMA engine limits to maximum segment size")
Closes: https://sashiko.dev/#/bug/linux-1f76aaa3-099b-4ac6-b793-e11a71bb003a
Cc: stable@vger.kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
---
drivers/mmc/host/jz4740_mmc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/host/jz4740_mmc.c b/drivers/mmc/host/jz4740_mmc.c
index e398a575f2dc..71aa7930a030 100644
--- a/drivers/mmc/host/jz4740_mmc.c
+++ b/drivers/mmc/host/jz4740_mmc.c
@@ -231,7 +231,7 @@ static int jz4740_mmc_acquire_dma_channels(struct jz4740_mmc_host *host)
host->dma_tx = dma_request_chan(dev, "tx-rx");
if (!IS_ERR(host->dma_tx))
- return 0;
+ goto out;
if (PTR_ERR(host->dma_tx) != -ENODEV) {
dev_err(dev, "Failed to get dma tx-rx channel\n");
@@ -251,6 +251,7 @@ static int jz4740_mmc_acquire_dma_channels(struct jz4740_mmc_host *host)
return PTR_ERR(host->dma_rx);
}
+out:
/*
* Limit the maximum segment size in any SG entry according to
* the parameters of the DMA engine device.
--
2.56.1.750.gf70dc682cf-goog
^ permalink raw reply [flat|nested] 15+ messages in thread* [PATCH 11/13] mmc: dw_mmc: Disarm central watchdog when ending a request
2026-11-23 19:15 [PATCH 00/13] mmc: Assorted bug fixes across MMC host drivers Lee Jones
` (9 preceding siblings ...)
2026-11-23 19:15 ` [PATCH 10/13] mmc: jz4740: Apply DMA max_seg_size limit to unified tx-rx channel Lee Jones
@ 2026-11-23 19:15 ` Lee Jones
2026-11-23 19:15 ` [PATCH 12/13] mmc: renesas_sdhi: Fix SDIO manual tap correction in SDR104 mode Lee Jones
2026-11-23 19:15 ` [PATCH 13/13] mmc: sdhci-brcmstb: Handle absent optional sdio_freq clock in probe Lee Jones
12 siblings, 0 replies; 15+ messages in thread
From: Lee Jones @ 2026-11-23 19:15 UTC (permalink / raw)
To: lee, Jaehoon Chung, Shawn Lin, Ulf Hansson, linux-mmc, linux-kernel
When EVENT_DATA_ERROR (such as SDMMC_INT_DCRC or SDMMC_INT_SBE) is
handled in STATE_SENDING_DATA, send_stop_abort() starts a stop command
and arms host->wd_timer for DW_MCI_WD_CMD_EVENTS. In STATE_DATA_BUSY,
dw_mci_data_complete() resets the controller on data error, aborting the
in-flight stop command, and dw_mci_work_func() ends the request via
dw_mci_request_end() if EVENT_CMD_COMPLETE is not already pending.
Because dw_mci_request_end() does not disarm host->wd_timer, the stale
command watch remains armed after mmc_request_done() and later injects a
spurious SDMMC_INT_RTO and EVENT_CMD_COMPLETE while idle or during a
subsequent recovery command (for example MMC_GO_IDLE_STATE, which does
not re-arm the command watchdog).
Disarm the central watchdog under host->irq_lock when transitioning to
STATE_IDLE in dw_mci_request_end(), and clear wd_states and
wd_deadline_ns alongside wd_events when disarming in
dw_mci_wd_deliver().
Fixes: ce0043b9a302 ("mmc: dw_mmc: add central watchdog and convert CTO onto it")
Closes: https://sashiko.dev/#/bug/linux-d7e53c20-ef39-494b-bb97-b00b62186c2f
Signed-off-by: Lee Jones <lee@kernel.org>
---
drivers/mmc/host/dw_mmc.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index ff0b25d287a9..6865cffad51a 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -79,8 +79,11 @@
static void dw_mci_wd_deliver(struct dw_mci *host, unsigned long events)
{
host->wd_events &= ~events;
- if (!host->wd_events)
+ if (!host->wd_events) {
+ host->wd_states = 0;
+ host->wd_deadline_ns = 0;
hrtimer_try_to_cancel(&host->wd_timer);
+ }
}
/*
@@ -1887,15 +1890,20 @@ static void dw_mci_request_end(struct dw_mci *host, struct mmc_request *mrq)
__acquires(&host->lock)
{
struct mmc_host *prev_mmc = host->mmc;
+ unsigned long irqflags;
WARN_ON(host->cmd || host->data);
host->mrq = NULL;
- if (host->state == STATE_SENDING_CMD11)
+ if (host->state == STATE_SENDING_CMD11) {
host->state = STATE_WAITING_CMD11_DONE;
- else
+ } else {
+ spin_lock_irqsave(&host->irq_lock, irqflags);
+ dw_mci_wd_deliver(host, ~0UL);
+ spin_unlock_irqrestore(&host->irq_lock, irqflags);
host->state = STATE_IDLE;
+ }
spin_unlock(&host->lock);
mmc_request_done(prev_mmc, mrq);
--
2.56.1.750.gf70dc682cf-goog
^ permalink raw reply [flat|nested] 15+ messages in thread* [PATCH 12/13] mmc: renesas_sdhi: Fix SDIO manual tap correction in SDR104 mode
2026-11-23 19:15 [PATCH 00/13] mmc: Assorted bug fixes across MMC host drivers Lee Jones
` (10 preceding siblings ...)
2026-11-23 19:15 ` [PATCH 11/13] mmc: dw_mmc: Disarm central watchdog when ending a request Lee Jones
@ 2026-11-23 19:15 ` Lee Jones
2026-11-23 19:15 ` [PATCH 13/13] mmc: sdhci-brcmstb: Handle absent optional sdio_freq clock in probe Lee Jones
12 siblings, 0 replies; 15+ messages in thread
From: Lee Jones @ 2026-11-23 19:15 UTC (permalink / raw)
To: lee, Wolfram Sang, Ulf Hansson, Josua Mayer, Geert Uytterhoeven,
Phil Blundell, Samuel Ortiz, Yoshihiro Shimoda, linux-mmc,
linux-renesas-soc, linux-kernel
Cc: stable
Commit 30fa7d53afd4 ("mmc: host: renesas_sdhi: Fix incorrect auto
retuning for an SDIO card") switched SDIO cards from automatic to manual
SCC tap correction so that DAT1 SDIO interrupts would not spuriously
shift the sampling tap, but exposed two logic errors in the manual
correction path:
1. renesas_sdhi_manual_correction() checks !priv->card_is_sdio instead
of priv->card_is_sdio before ignoring DAT1 mismatches, so the SDIO
DAT1 check never executes for SDIO cards.
2. renesas_sdhi_check_scc_error() already returns early when running in
4-tap HS400 mode, yet still passes the hs400_4taps quirk flag as
use_4tap to renesas_sdhi_manual_correction(), halving the 8-tap
SDR104 and HS200 tap index when writing SH_MOBILE_SDHI_SCC_TAPSET on
SoCs with hs400_4taps.
Check priv->card_is_sdio without negation and drop the unused 4-tap
division from renesas_sdhi_manual_correction().
Fixes: 30fa7d53afd4 ("mmc: host: renesas_sdhi: Fix incorrect auto retuning for an SDIO card")
Closes: https://sashiko.dev/#/bug/linux-735317da-fe00-4630-b954-5dcc1052aaa8
Cc: stable@vger.kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
---
drivers/mmc/host/renesas_sdhi_core.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
index cb35360239bf..497c7c75f966 100644
--- a/drivers/mmc/host/renesas_sdhi_core.c
+++ b/drivers/mmc/host/renesas_sdhi_core.c
@@ -741,7 +741,7 @@ static int renesas_sdhi_execute_tuning(struct mmc_host *mmc, u32 opcode)
return ret;
}
-static bool renesas_sdhi_manual_correction(struct tmio_mmc_host *host, bool use_4tap)
+static bool renesas_sdhi_manual_correction(struct tmio_mmc_host *host)
{
struct renesas_sdhi *priv = host_to_priv(host);
unsigned int new_tap = priv->tap_set, error_tap = priv->tap_set;
@@ -783,7 +783,7 @@ static bool renesas_sdhi_manual_correction(struct tmio_mmc_host *host, bool use_
if (bad_taps & BIT(new_tap % priv->tap_num))
return test_bit(error_tap % priv->tap_num, priv->smpcmp);
} else {
- if (!priv->card_is_sdio &&
+ if (priv->card_is_sdio &&
!(val & SH_MOBILE_SDHI_SCC_RVSREQ_RVSERR)) {
u32 smpcmp = sd_scc_read32(host, priv, SH_MOBILE_SDHI_SCC_SMPCMP);
@@ -802,8 +802,7 @@ static bool renesas_sdhi_manual_correction(struct tmio_mmc_host *host, bool use_
}
priv->tap_set = (new_tap % priv->tap_num);
- sd_scc_write32(host, priv, SH_MOBILE_SDHI_SCC_TAPSET,
- priv->tap_set / (use_4tap ? 2 : 1));
+ sd_scc_write32(host, priv, SH_MOBILE_SDHI_SCC_TAPSET, priv->tap_set);
return false;
}
@@ -854,7 +853,7 @@ static bool renesas_sdhi_check_scc_error(struct tmio_mmc_host *host,
SH_MOBILE_SDHI_SCC_RVSCNTL_RVSEN)
ret |= renesas_sdhi_auto_correction(host);
else
- ret |= renesas_sdhi_manual_correction(host, use_4tap);
+ ret |= renesas_sdhi_manual_correction(host);
return ret;
}
--
2.56.1.750.gf70dc682cf-goog
^ permalink raw reply [flat|nested] 15+ messages in thread* [PATCH 13/13] mmc: sdhci-brcmstb: Handle absent optional sdio_freq clock in probe
2026-11-23 19:15 [PATCH 00/13] mmc: Assorted bug fixes across MMC host drivers Lee Jones
` (11 preceding siblings ...)
2026-11-23 19:15 ` [PATCH 12/13] mmc: renesas_sdhi: Fix SDIO manual tap correction in SDR104 mode Lee Jones
@ 2026-11-23 19:15 ` Lee Jones
2026-11-23 19:31 ` Florian Fainelli
12 siblings, 1 reply; 15+ messages in thread
From: Lee Jones @ 2026-11-23 19:15 UTC (permalink / raw)
To: lee, Adrian Hunter, Kamal Dasu, Al Cooper,
Broadcom internal kernel review list, Ulf Hansson,
Florian Fainelli, linux-mmc, linux-arm-kernel, linux-kernel
Cc: stable
Standard MMC Device Tree nodes may specify "clock-frequency" on SoCs
that do not provide the optional 72116B0 "sdio_freq" clock, in which
case devm_clk_get_optional() legitimately returns NULL. However,
sdhci_brcmstb_probe() only checks IS_ERR(base_clk): when base_clk is
NULL, clk_get_rate(base_clk) evaluates to 0 and overwrites
SDHCI_CLOCK_V3_BASE_MASK in host->caps with 0 MHz while leaving
priv->base_freq_hz non-zero for system resume.
Check IS_ERR_OR_NULL(base_clk) and clear priv->base_freq_hz on the
fallback path before jumping to add_host.
Fixes: 97904a59855c ("mmc: sdhci-brcmstb: Add ability to increase max clock rate for 72116b0")
Closes: https://sashiko.dev/#/bug/linux-88799a75-1ece-4f9d-bdab-eeb713627ab2
Cc: stable@vger.kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
---
drivers/mmc/host/sdhci-brcmstb.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/sdhci-brcmstb.c b/drivers/mmc/host/sdhci-brcmstb.c
index db857f2273e2..976cddb2ca9e 100644
--- a/drivers/mmc/host/sdhci-brcmstb.c
+++ b/drivers/mmc/host/sdhci-brcmstb.c
@@ -585,8 +585,10 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
goto add_host;
base_clk = devm_clk_get_optional(&pdev->dev, "sdio_freq");
- if (IS_ERR(base_clk)) {
- dev_warn(&pdev->dev, "Clock for \"sdio_freq\" not found\n");
+ if (IS_ERR_OR_NULL(base_clk)) {
+ if (IS_ERR(base_clk))
+ dev_warn(&pdev->dev, "Clock for \"sdio_freq\" not found\n");
+ priv->base_freq_hz = 0;
goto add_host;
}
--
2.56.1.750.gf70dc682cf-goog
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [PATCH 13/13] mmc: sdhci-brcmstb: Handle absent optional sdio_freq clock in probe
2026-11-23 19:15 ` [PATCH 13/13] mmc: sdhci-brcmstb: Handle absent optional sdio_freq clock in probe Lee Jones
@ 2026-11-23 19:31 ` Florian Fainelli
0 siblings, 0 replies; 15+ messages in thread
From: Florian Fainelli @ 2026-11-23 19:31 UTC (permalink / raw)
To: Lee Jones, Adrian Hunter, Kamal Dasu, Al Cooper,
Broadcom internal kernel review list, Ulf Hansson, linux-mmc,
linux-arm-kernel, linux-kernel
Cc: stable
On 11/23/2026 11:15 AM, Lee Jones wrote:
> Standard MMC Device Tree nodes may specify "clock-frequency" on SoCs
> that do not provide the optional 72116B0 "sdio_freq" clock, in which
> case devm_clk_get_optional() legitimately returns NULL. However,
> sdhci_brcmstb_probe() only checks IS_ERR(base_clk): when base_clk is
> NULL, clk_get_rate(base_clk) evaluates to 0 and overwrites
> SDHCI_CLOCK_V3_BASE_MASK in host->caps with 0 MHz while leaving
> priv->base_freq_hz non-zero for system resume.
>
> Check IS_ERR_OR_NULL(base_clk) and clear priv->base_freq_hz on the
> fallback path before jumping to add_host.
>
> Fixes: 97904a59855c ("mmc: sdhci-brcmstb: Add ability to increase max clock rate for 72116b0")
> Closes: https://sashiko.dev/#/bug/linux-88799a75-1ece-4f9d-bdab-eeb713627ab2
> Cc: stable@vger.kernel.org
> Signed-off-by: Lee Jones <lee@kernel.org>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Not sure this deserves a Fixes: tag.
--
Florian
^ permalink raw reply [flat|nested] 15+ messages in thread