Re: [PATCH] dmaengine: qcom: gpi: correct channel name in error path

From: Frank Li

Date: Thu Jun 25 2026 - 11:02:49 EST


On Thu, Jun 25, 2026 at 10:21:36AM -0400, Brian Masney wrote:
> When attempting to start the Fedora graphical installer from a USB
> thumbdrive on the Lenovo Thinkpad x13s laptop, the following errors are
> shown in dmesg multiple times:
>
> kernel: gpi 800000.dma-controller: cmd: CH START completion timeout:0
> kernel: gpi 800000.dma-controller: Error with cmd:CH START ret:-5
> kernel: gpi 800000.dma-controller: Error start chan:-5
>
> Looking through the error path, gpi_send_cmd() sends the wrong gchan to
> gpi_send_cmd() in gpi_ch_init()'s error path. Let's fix this by passing
> the correct gchan.

Fix this by passing the correct gchan in gpi_ch_init()'s error path of
gpi_send_cmd().

>
> Fixes: 5d0c3533a19f ("dmaengine: qcom: Add GPI dma driver")
> Signed-off-by: Brian Masney <bmasney@xxxxxxxxxx>
> Assisted-by: Claude:claude-opus-4-6
> ---
> There's a separate issue with the graphical Fedora installer not
> working that I haven't had time to dig into further. I can work
> around it by using the text installer.
> ---
> drivers/dma/qcom/gpi.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/dma/qcom/gpi.c b/drivers/dma/qcom/gpi.c
> index a5055a6273af..3f390b5821ab 100644
> --- a/drivers/dma/qcom/gpi.c
> +++ b/drivers/dma/qcom/gpi.c
> @@ -1965,12 +1965,12 @@ static int gpi_ch_init(struct gchan *gchan)
> error_start_chan:
> for (i = i - 1; i >= 0; i--) {
> gpi_stop_chan(&gpii->gchan[i]);

Not related this patch, but code logic is strange, why init one specific
gchan failure, need stop previous all chans.

gchan should be one of gpii->gchan[i].

Frank
> - gpi_send_cmd(gpii, gchan, GPI_CH_CMD_RESET);
> + gpi_send_cmd(gpii, &gpii->gchan[i], GPI_CH_CMD_RESET);
> }
> i = 2;
> error_alloc_chan:
> for (i = i - 1; i >= 0; i--)
> - gpi_reset_chan(gchan, GPI_CH_CMD_DE_ALLOC);
> + gpi_reset_chan(&gpii->gchan[i], GPI_CH_CMD_DE_ALLOC);
> error_alloc_ev_ring:
> gpi_disable_interrupts(gpii);
> error_config_int:
>
> ---
> base-commit: 6c94b38b83a04c43ea49004275f0391404051093
> change-id: 20260625-qcom-gpi-err-fix-06ef18453608
>
> Best regards,
> --
> Brian Masney <bmasney@xxxxxxxxxx>
>