FAILED: patch "[PATCH] mmc: omap: synchronize clock timer before disabling fclk" failed to apply to 5.15-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x c931c51681e33b24bc8d65c6df35b70e1827daa2
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026112429-handgun-idealist-1f47@gregkh' --subject-prefix 'PATCH 5.15.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From c931c51681e33b24bc8d65c6df35b70e1827daa2 Mon Sep 17 00:00:00 2001
From: Runyu Xiao <[email protected]>
Date: Tue, 29 Sep 2026 20:45:22 +0800
Subject: [PATCH] mmc: omap: synchronize clock timer before disabling fclk
mmc_omap_select_slot() removes clk_timer with timer_delete() before switching slots and changing the functional clock state. timer_delete() only removes a pending timer and does not wait for a callback that is already running.
If mmc_omap_clk_timer() is already running, it can therefore call mmc_omap_fclk_enable() while the request or slot-switch path changes the same clock state. During host removal, the same window can overlap the final clock shutdown.
Use timer_delete_sync() so the callback has completed before slot switching or changing the functional clock state. Keep the timer restartable for normal request handling.
drivers/mmc/host/omap.c +2 -2
@@ -214,7 +214,7 @@ static void mmc_omap_select_slot(struct mmc_omap_slot *slot, int claimed) host->mmc = slot->mmc;spin_unlock_irqrestore (&host->slot_lock, flags); no_claim: -timer_delete (&host->clk_timer); +timer_delete_sync (&host->clk_timer);if (host->current_slot != slot || !claimed)mmc_omap_fclk_offdelay (host->current_slot);
@@ -273,7 +273,7 @@ static void mmc_omap_release_slot(struct mmc_omap_slot *slot, int clk_enabled)/* Keeps clock running for at least 8 cycles on valid freq */ mod_timer (&host->clk_timer, jiffies +HZ /10 ); else { -timer_delete (&host->clk_timer); +timer_delete_sync (&host->clk_timer);mmc_omap_fclk_offdelay (slot);mmc_omap_fclk_enable (host,0 ); }
Sasha Levin
maintainerPATCH 1/1 mmc: omap: synchronize clock timer before disabling fclk
From: Runyu Xiao <[email protected]>
[ Upstream commit c931c51681e33b24bc8d65c6df35b70e1827daa2 ]
mmc_omap_select_slot() removes clk_timer with timer_delete() before switching slots and changing the functional clock state. timer_delete() only removes a pending timer and does not wait for a callback that is already running.
If mmc_omap_clk_timer() is already running, it can therefore call mmc_omap_fclk_enable() while the request or slot-switch path changes the same clock state. During host removal, the same window can overlap the final clock shutdown.
Use timer_delete_sync() so the callback has completed before slot switching or changing the functional clock state. Keep the timer restartable for normal request handling.
--- drivers/mmc/host/omap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/host/omap.c +2 -2
@@ -210,7 +210,7 @@ static void mmc_omap_select_slot(struct mmc_omap_slot *slot, int claimed) host->mmc = slot->mmc;spin_unlock_irqrestore (&host->slot_lock, flags); no_claim: -del_timer (&host->clk_timer); +del_timer_sync (&host->clk_timer);if (host->current_slot != slot || !claimed)mmc_omap_fclk_offdelay (host->current_slot);
@@ -264,7 +264,7 @@ static void mmc_omap_release_slot(struct mmc_omap_slot *slot, int clk_enabled)/* Keeps clock running for at least 8 cycles on valid freq */ mod_timer (&host->clk_timer, jiffies +HZ /10 ); else { -del_timer (&host->clk_timer); +del_timer_sync (&host->clk_timer);mmc_omap_fclk_offdelay (slot);mmc_omap_fclk_enable (host,0 ); }
Signature · 1 line
2.53.0