lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AM6PR04MB4838EC7BBD1125F60A3F389D88FAA@AM6PR04MB4838.eurprd04.prod.outlook.com>
Date:   Tue, 19 Sep 2023 04:31:22 +0000
From:   Frank Li <frank.li@....com>
To:     "vkoul@...nel.org" <vkoul@...nel.org>
CC:     "dmaengine@...r.kernel.org" <dmaengine@...r.kernel.org>,
        "imx@...ts.linux.dev" <imx@...ts.linux.dev>,
        Joy Zou <joy.zou@....com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Peng Fan <peng.fan@....com>,
        Shenwei Wang <shenwei.wang@....com>
Subject: RE: [PATCH 1/1] dmaengine: fsl-edma: fix edma4 channel enable failure
 on second attempt



> -----Original Message-----
> From: Frank Li <frank.li@....com>
> Sent: Wednesday, August 23, 2023 1:27 PM
> To: vkoul@...nel.org
> Cc: devicetree@...r.kernel.org; dmaengine@...r.kernel.org; Frank Li
> <frank.li@....com>; imx@...ts.linux.dev; Joy Zou <joy.zou@....com>;
> krzysztof.kozlowski+dt@...aro.org; linux-kernel@...r.kernel.org; Peng Fan
> <peng.fan@....com>; robh+dt@...nel.org; Shenwei Wang
> <shenwei.wang@....com>
> Subject: [PATCH 1/1] dmaengine: fsl-edma: fix edma4 channel enable failure
> on second attempt
> 
> When attempting to start DMA for the second time using
> fsl_edma3_enable_request(), channel never start.
> 
> CHn_MUX must have a unique value when selecting a peripheral slot in the
> channel mux configuration. The only value that may overlap is source 0.
> If there is an attempt to write a mux configuration value that is already
> consumed by another channel, a mux configuration of 0 (SRC = 0) will be
> written.
> 
> Check CHn_MUX before writing in fsl_edma3_enable_request().
> 
> Fixes: 72f5801a4e2b ("dmaengine: fsl-edma: integrate v3 support")
> Signed-off-by: Frank Li <Frank.Li@....com>
> ---

@vinod: 
	ping 

>  drivers/dma/fsl-edma-common.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/dma/fsl-edma-common.c b/drivers/dma/fsl-edma-
> common.c
> index a0f5741abcc4..edb92fa93315 100644
> --- a/drivers/dma/fsl-edma-common.c
> +++ b/drivers/dma/fsl-edma-common.c
> @@ -92,8 +92,14 @@ static void fsl_edma3_enable_request(struct
> fsl_edma_chan *fsl_chan)
> 
>  	edma_writel_chreg(fsl_chan, val, ch_sbr);
> 
> -	if (flags & FSL_EDMA_DRV_HAS_CHMUX)
> -		edma_writel_chreg(fsl_chan, fsl_chan->srcid, ch_mux);
> +	if (flags & FSL_EDMA_DRV_HAS_CHMUX) {
> +		/*
> +		 * ch_mux: With the exception of 0, attempts to write a value
> +		 * already in use will be forced to 0.
> +		 */
> +		if (!edma_readl_chreg(fsl_chan, ch_mux))
> +			edma_writel_chreg(fsl_chan, fsl_chan->srcid,
> ch_mux);
> +	}
> 
>  	val = edma_readl_chreg(fsl_chan, ch_csr);
>  	val |= EDMA_V3_CH_CSR_ERQ;
> --
> 2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ