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: <20200731091528.GI3703480@smile.fi.intel.com>
Date:   Fri, 31 Jul 2020 12:15:28 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Serge Semin <Sergey.Semin@...kalelectronics.ru>
Cc:     Mark Brown <broonie@...nel.org>,
        Serge Semin <fancer.lancer@...il.com>,
        Alexey Malahov <Alexey.Malahov@...kalelectronics.ru>,
        Georgy Vlasov <Georgy.Vlasov@...kalelectronics.ru>,
        Ramil Zaripov <Ramil.Zaripov@...kalelectronics.ru>,
        Pavel Parkhomenko <Pavel.Parkhomenko@...kalelectronics.ru>,
        Peter Ujfalusi <peter.ujfalusi@...com>,
        Feng Tang <feng.tang@...el.com>, Vinod Koul <vkoul@...nel.org>,
        linux-spi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/8] spi: dw-dma: Move DMA transfers submission to the
 channels prep methods

On Fri, Jul 31, 2020 at 10:59:49AM +0300, Serge Semin wrote:
> Indeed we can freely move the dmaengine_submit() method invocation and the
> Tx and Rx busy flag setting into the DMA Tx/Rx prepare methods. By doing
> so first we implement another preparation before adding the one-by-one DMA
> SG entries transmission, second we now have the dma_async_tx_descriptor
> descriptor used locally only in the new DMA transfers submitition methods,
> which makes the code less complex with no passing around the DMA Tx
> descriptors, third we make the generic transfer method more readable, where
> now the functionality of submission, execution and wait procedures is
> transparently split up instead of having a preparation, intermixed
> submission/execution and wait procedures. While at it we also add the
> dmaengine_submit() return value test. It has been unnecessary for
> DW DMAC, but should be done to support the generic DMA interface.
> 
> Note since the DMA channels preparation methods are now responsible for
> the DMA transactions submission, we also rename them to
> dw_spi_dma_submit_{tx,rx}().

...

> +	cookie = dmaengine_submit(txdesc);
> +	ret = dma_submit_error(cookie);
> +	if (!ret)

Use traditional pattern
	if (ret)
		return ret;

Same for below.

> +		set_bit(TX_BUSY, &dws->dma_chan_busy);
> +
> +	return ret;

...

> -	if (!xfer->rx_buf)
> -		return NULL;

This seems not related.

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ