* [PATCH] dmaengine: qcom: adm: Propagate reset errors from probe
@ 2026-11-29 19:25 Jiawen Liu
2026-11-29 19:43 ` sashiko-bot
2026-11-30 2:11 ` Krzysztof Kozlowski
0 siblings, 2 replies; 3+ messages in thread
From: Jiawen Liu @ 2026-11-29 19:25 UTC (permalink / raw)
To: Vinod Koul; +Cc: Frank Li, linux-arm-msm, dmaengine
With fw_devlink=off on IPQ8064, GCC can unbind while ADM is probing.
If GCC unregisters its reset controller after ADM asserts reset, the
reset core invalidates the held handles. Deassertion then returns
-ENODEV. ADM ignores the error and can program its registers and
register a DMA provider while the block is still in reset. A NAND
client can then time out waiting for DMA completion.
Check each reset assertion and deassertion and return the first error
through the existing clock cleanup path, before programming ADM
registers, requesting the IRQ or registering the DMA provider.
Keep the reset order and the 2 us delay.
Verification included a source trace of the reset and clock unwind
paths, a 32-bit ARM qcom_adm.o build with QCOM_ADM, IPQ_GCC_806X and
RESET_CONTROLLER enabled, git diff --check and checkpatch.
Runtime and hardware reproduction were not performed.
Fixes: 78ebbff6d1a0 ("reset: handle removing supplier before consumers")
Signed-off-by: Jiawen Liu <liu1298662399@gmail.com>
---
drivers/dma/qcom/qcom_adm.c | 32 ++++++++++++++++++++++++--------
1 file changed, 24 insertions(+), 8 deletions(-)
diff --git a/drivers/dma/qcom/qcom_adm.c b/drivers/dma/qcom/qcom_adm.c
index b38ee75a96378..2c6896b71a780 100644
--- a/drivers/dma/qcom/qcom_adm.c
+++ b/drivers/dma/qcom/qcom_adm.c
@@ -812,17 +812,33 @@ static int adm_dma_probe(struct platform_device *pdev)
goto err_disable_core_clk;
}
- reset_control_assert(adev->clk_reset);
- reset_control_assert(adev->c0_reset);
- reset_control_assert(adev->c1_reset);
- reset_control_assert(adev->c2_reset);
+ ret = reset_control_assert(adev->clk_reset);
+ if (ret)
+ goto err_disable_clks;
+ ret = reset_control_assert(adev->c0_reset);
+ if (ret)
+ goto err_disable_clks;
+ ret = reset_control_assert(adev->c1_reset);
+ if (ret)
+ goto err_disable_clks;
+ ret = reset_control_assert(adev->c2_reset);
+ if (ret)
+ goto err_disable_clks;
udelay(2);
- reset_control_deassert(adev->clk_reset);
- reset_control_deassert(adev->c0_reset);
- reset_control_deassert(adev->c1_reset);
- reset_control_deassert(adev->c2_reset);
+ ret = reset_control_deassert(adev->clk_reset);
+ if (ret)
+ goto err_disable_clks;
+ ret = reset_control_deassert(adev->c0_reset);
+ if (ret)
+ goto err_disable_clks;
+ ret = reset_control_deassert(adev->c1_reset);
+ if (ret)
+ goto err_disable_clks;
+ ret = reset_control_deassert(adev->c2_reset);
+ if (ret)
+ goto err_disable_clks;
adev->channels = devm_kzalloc_objs(adev->dev, *adev->channels,
ADM_MAX_CHANNELS);
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] dmaengine: qcom: adm: Propagate reset errors from probe
2026-11-29 19:25 [PATCH] dmaengine: qcom: adm: Propagate reset errors from probe Jiawen Liu
@ 2026-11-29 19:43 ` sashiko-bot
2026-11-30 2:11 ` Krzysztof Kozlowski
1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-11-29 19:43 UTC (permalink / raw)
To: Jiawen Liu; +Cc: dmaengine, vkoul, Frank.Li
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] dmaengine: qcom: adm: inaccurate Fixes trailer in commit message
--
commit 9bca7345605b3adf090ac246e6f33dd343ab2adb
Author: Jiawen Liu <liu1298662399@gmail.com>
> dmaengine: qcom: adm: Propagate reset errors from probe
>
> With fw_devlink=off on IPQ8064, GCC can unbind while ADM is probing.
> If GCC unregisters its reset controller after ADM asserts reset, the
> reset core invalidates the held handles. Deassertion then returns
> -ENODEV. ADM ignores the error and can program its registers and
> register a DMA provider while the block is still in reset. A NAND
> client can then time out waiting for DMA completion.
>
> Check each reset assertion and deassertion and return the first error
> through the existing clock cleanup path, before programming ADM
> registers, requesting the IRQ or registering the DMA provider.
> Keep the reset order and the 2 us delay.
>
> Verification included a source trace of the reset and clock unwind
> paths, a 32-bit ARM qcom_adm.o build with QCOM_ADM, IPQ_GCC_806X and
> RESET_CONTROLLER enabled, git diff --check and checkpatch.
> Runtime and hardware reproduction were not performed.
>
> Fixes: 78ebbff6d1a0 ("reset: handle removing supplier before consumers")
> Signed-off-by: Jiawen Liu <liu1298662399@gmail.com>
[Severity: Low]
Commit 78ebbff6d1a0 ("reset: handle removing supplier before consumers") only
updated the reset core to return -ENODEV when a reset provider is removed.
The unchecked reset_control_assert() and reset_control_deassert() calls in
adm_dma_probe() were introduced when the driver was added. Should the Fixes
tag point to that commit instead?
Fixes: 5c9f8c2dbdbe ("dmaengine: qcom: Add ADM driver")
--
Sashiko AI review · https://sashiko.dev/#/patchset/179598034305.2.8178651388048278541.pattern-ext-136.24@gmail.com?part=1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dmaengine: qcom: adm: Propagate reset errors from probe
2026-11-29 19:25 [PATCH] dmaengine: qcom: adm: Propagate reset errors from probe Jiawen Liu
2026-11-29 19:43 ` sashiko-bot
@ 2026-11-30 2:11 ` Krzysztof Kozlowski
1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2026-11-30 2:11 UTC (permalink / raw)
To: Jiawen Liu; +Cc: dmaengine, Vinod Koul, linux-arm-msm, Frank Li
On Sun, 29 Nov 2026 19:25:33 +0000, Jiawen Liu wrote:
> With fw_devlink=off on IPQ8064, GCC can unbind while ADM is probing.
> If GCC unregisters its reset controller after ADM asserts reset, the
> reset core invalidates the held handles. Deassertion then returns
> -ENODEV. ADM ignores the error and can program its registers and
> register a DMA provider while the block is still in reset. A NAND
> client can then time out waiting for DMA completion.
>
> Check each reset assertion and deassertion and return the first error
> through the existing clock cleanup path, before programming ADM
> registers, requesting the IRQ or registering the DMA provider.
> Keep the reset order and the 2 us delay.
>
> Verification included a source trace of the reset and clock unwind
> paths, a 32-bit ARM qcom_adm.o build with QCOM_ADM, IPQ_GCC_806X and
> RESET_CONTROLLER enabled, git diff --check and checkpatch.
> Runtime and hardware reproduction were not performed.
>
> Fixes: 78ebbff6d1a0 ("reset: handle removing supplier before consumers")
> Signed-off-by: Jiawen Liu <liu1298662399@gmail.com>
> ---
> drivers/dma/qcom/qcom_adm.c | 32 ++++++++++++++++++++++++--------
> 1 file changed, 24 insertions(+), 8 deletions(-)
>
You sent multiple independent patches, to multiple independent
subsystems. The amount of these patches clearly suggest this was
AI generated and most likely not tested.
More importantly, you sent all this work without properly organizing
relevant patches into patchsets. This makes reviewing difficult
and might cause multiple reviewers to address the same issue.
Replying to the entire set is impossible and requires handling each
patch independently, instead of applying or discarding the set.
Maintainers also won't see the bigger picture of your work. Quite
worrying.
Please read kernel documentation BEFORE posting more work. It will
explain you how to identify subsystems, how to organize your work per
subsystem (so a patchset grouping multiple patches with a short cover
letter), how to document the issue discovery method and what was
or was not tested.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-30 2:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-29 19:25 [PATCH] dmaengine: qcom: adm: Propagate reset errors from probe Jiawen Liu
2026-11-29 19:43 ` sashiko-bot
2026-11-30 2:11 ` Krzysztof Kozlowski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.