[PATCH v2] async_tx: use the channel-switch Kconfig symbol

From: Pengpeng Hou

Date: Fri Aug 14 2026 - 04:02:34 EST


ASYNC_TX_ENABLE_CHANNEL_SWITCH is the Kconfig symbol selected by DMA
engine providers that need async_tx channel switching.

CONFIG_ASYNC_TX_CHANNEL_SWITCH is not generated by Kconfig, so the
shortcut in async_tx.h tests an impossible symbol. Use the generated
CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH name instead.

Fixes: b802c8410ca9 ("async_tx: deprecate broken support for channel switching")
Assisted-by: Codex:gpt-5
Signed-off-by: Pengpeng Hou <pengpeng@xxxxxxxxxxx>
---
Changes since v1: https://lore.kernel.org/all/20260624081404.82604-1-pengpeng@xxxxxxxxxxx/
- rebase on current async_tx sources
- document that only ASYNC_TX_ENABLE_CHANNEL_SWITCH is generated by Kconfig

The Kconfig name and preprocessor path were reviewed statically; no DMA-
engine runtime test was performed.

include/linux/async_tx.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/async_tx.h b/include/linux/async_tx.h
index 1ca9f9e05f4f..1659a06c034b 100644
--- a/include/linux/async_tx.h
+++ b/include/linux/async_tx.h
@@ -74,7 +74,7 @@ struct async_submit_ctl {
void *scribble;
};

-#if defined(CONFIG_DMA_ENGINE) && !defined(CONFIG_ASYNC_TX_CHANNEL_SWITCH)
+#if defined(CONFIG_DMA_ENGINE) && !defined(CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH)
#define async_tx_issue_pending_all dma_issue_pending_all

/**
--
2.50.1 (Apple Git-155)